# Module: vertx-service-discovery-js/event_bus_service

### Classes

EventBusService

### Methods

#### (static) EventBusService.createRecord(name, address, itf, metadata) → {Object}

Sugar method to creates a record for this type.

The java interface is added to the metadata in the `service.interface` key.

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | string | the name of the service.
`address` | string | the event bus address on which the service available
`itf` | string | the Java interface (name)
`metadata` | Object | the metadata

Source:
  - vertx-service-discovery-js/event_bus_service.js, line 72

##### Returns:

the created record

Type
  Object

#### (static) EventBusService.getServiceProxy(discovery, filter, clientClass, resultHandler) → {Object}

Lookup for a service record and if found, retrieve it and return the service object (used to consume the service). This is a convenient method to avoid explicit lookup and then retrieval of the service. This method requires to have the `clientClass` set with the expected set of client. This is important for usages not using Java so you can pass the expected type.

##### Parameters:

Name | Type | Description
--- | --- | ---
`discovery` | ServiceDiscovery | the service discovery
`filter` | todo | the filter
`clientClass` | todo | the client class
`resultHandler` | function | the result handler

Source:
  - vertx-service-discovery-js/event_bus_service.js, line 94

##### Returns:

`null` - do not use

Type
  Object

#### (static) EventBusService.getServiceProxyWithJsonFilter(discovery, filter, clientClass, resultHandler) → {Object}

Lookup for a service record and if found, retrieve it and return the service object (used to consume the service). This is a convenient method to avoid explicit lookup and then retrieval of the service. This method requires to have the `clientClass` set with the expected set of client. This is important for usages not using Java so you can pass the expected type.

##### Parameters:

Name | Type | Description
--- | --- | ---
`discovery` | ServiceDiscovery | the service discovery
`filter` | Object | the filter as json object
`clientClass` | todo | the client class
`resultHandler` | function | the result handler

Source:
  - vertx-service-discovery-js/event_bus_service.js, line 123

##### Returns:

`null` - do not use

Type
  Object