# Class: Service

## ProtoBuf.Builder. Service

Barebone of all runtime services.

#### new Service(rpcImplopt)

  Constructs a new runtime Service.

  ##### Parameters:

  Name | Type | Attributes | Description
  --- | --- | --- | ---
  `rpcImpl` | function | <optional> | RPC implementation receiving the method name and the message

  Source:
    - ProtoBuf.js, line 3942

  ##### Throws:

  If the service cannot be created
  Type
    Error

### Members

#### (static) $options :Object.<string, *>

  Service options.

  ##### Type:

  - Object.<string, *>
  Source:
    - ProtoBuf.js, line 4042

#### (static, non-null) $type :ProtoBuf.Reflect.Service

  Reflection type.

  ##### Type:

  - ProtoBuf.Reflect.Service
  Source:
    - ProtoBuf.js, line 4058

#### $options :Object.<string, *>

  Service options.

  ##### Type:

  - Object.<string, *>
  Source:
    - ProtoBuf.js, line 4050

#### (non-null) $type :ProtoBuf.Reflect.Service

  Reflection type.

  ##### Type:

  - ProtoBuf.Reflect.Service
  Source:
    - ProtoBuf.js, line 4066

#### (non-null) rpcImpl :function

  Service implementation.

  ##### Type:

  - function
  Source:
    - ProtoBuf.js, line 3953

### Methods

#### (abstract, static) [Method](rpcImplnon-null, req, callback)

  Asynchronously performs an RPC call using the given RPC implementation.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `rpcImpl` | function | RPC implementation
  `req` | ProtoBuf.Builder.Message | Request
  `callback` | function | Callback receiving the error if any and the response either as a pre-parsed message or as its raw bytes

  Source:
    - ProtoBuf.js, line 3973

#### (abstract) [Method](req, callback)

  Asynchronously performs an RPC call using the instance's RPC implementation.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `req` | ProtoBuf.Builder.Message | Request
  `callback` | function | Callback receiving the error if any and the response either as a pre-parsed message or as its raw bytes

  Source:
    - ProtoBuf.js, line 3984