Classes
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 |
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 |
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 |
Returns:
null
- do not use
- Type
- Object