public interface EventBusService extends ServiceType
ServiceType
for event bus services (service proxies).
Consumers receive a service proxy to use the service.Modifier and Type | Field and Description |
---|---|
static String |
TYPE
Name of the type.
|
UNKNOWN
Modifier and Type | Method and Description |
---|---|
static Record |
createRecord(String name,
String address,
Class itf)
Same as
createRecord(String, String, Class, JsonObject) but without metadata. |
static Record |
createRecord(String name,
String address,
Class itf,
JsonObject metadata)
Sugar method to creates a record for this type.
|
static Record |
createRecord(String name,
String address,
String classname)
Creates a record based on the parameters.
|
static Record |
createRecord(String name,
String address,
String itf,
JsonObject metadata)
Sugar method to creates a record for this type.
|
static <T> T |
getProxy(ServiceDiscovery discovery,
Class<T> itf,
Handler<AsyncResult<T>> resultHandler)
Lookup for a service record and if found, retrieve it and return the service object (used to consume the service).
|
static <T> T |
getProxy(ServiceDiscovery discovery,
Class<T> itf,
JsonObject conf,
Handler<AsyncResult<T>> resultHandler)
Lookup for a service record and if found, retrieve it and return the service object (used to consume the service).
|
static <T> T |
getServiceProxy(ServiceDiscovery discovery,
java.util.function.Function<Record,Boolean> filter,
Class<T> clientClass,
Handler<AsyncResult<T>> resultHandler)
Lookup for a service record and if found, retrieve it and return the service object (used to consume the service).
|
static <T> T |
getServiceProxy(ServiceDiscovery discovery,
java.util.function.Function<Record,Boolean> filter,
Class<T> clientClass,
JsonObject conf,
Handler<AsyncResult<T>> resultHandler)
Lookup for a service record and if found, retrieve it and return the service object (used to consume the service).
|
static <T> T |
getServiceProxyWithJsonFilter(ServiceDiscovery discovery,
JsonObject filter,
Class<T> clientClass,
Handler<AsyncResult<T>> resultHandler)
Lookup for a service record and if found, retrieve it and return the service object (used to consume the service).
|
static <T> T |
getServiceProxyWithJsonFilter(ServiceDiscovery discovery,
JsonObject filter,
Class<T> clientClass,
JsonObject conf,
Handler<AsyncResult<T>> resultHandler)
Lookup for a service record and if found, retrieve it and return the service object (used to consume the service).
|
get, name
static final String TYPE
static Record createRecord(String name, String address, Class itf, JsonObject metadata)
The java interface is added to the metadata in the `service.interface` key.
name
- the name of the service.address
- the event bus address on which the service availableitf
- the Java interfacemetadata
- the metadatastatic Record createRecord(String name, String address, String itf, JsonObject metadata)
The java interface is added to the metadata in the `service.interface` key.
name
- the name of the service.address
- the event bus address on which the service availableitf
- the Java interface (name)metadata
- the metadatastatic Record createRecord(String name, String address, Class itf)
createRecord(String, String, Class, JsonObject)
but without metadata.name
- the name of the serviceitf
- the Java interfaceaddress
- the event bus address on which the service availablestatic <T> T getProxy(ServiceDiscovery discovery, Class<T> itf, Handler<AsyncResult<T>> resultHandler)
T
- the service interfacediscovery
- the service discovery instanceitf
- the service interfaceresultHandler
- the result handlernull
static <T> T getProxy(ServiceDiscovery discovery, Class<T> itf, JsonObject conf, Handler<AsyncResult<T>> resultHandler)
T
- the service interfacediscovery
- the service discovery instanceitf
- the service interfaceconf
- the configuration for message deliveryresultHandler
- the result handlernull
static <T> T getServiceProxy(ServiceDiscovery discovery, java.util.function.Function<Record,Boolean> filter, Class<T> clientClass, Handler<AsyncResult<T>> resultHandler)
clientClass
set with the expected set of client. This is important for usages not using Java so
you can pass the expected type.T
- the type of the client classdiscovery
- the service discoveryfilter
- the filterclientClass
- the client classresultHandler
- the result handlernull
- do not usestatic <T> T getServiceProxy(ServiceDiscovery discovery, java.util.function.Function<Record,Boolean> filter, Class<T> clientClass, JsonObject conf, Handler<AsyncResult<T>> resultHandler)
clientClass
set with the expected set of client. This is important for usages not using Java so
you can pass the expected type.T
- the type of the client classdiscovery
- the service discoveryfilter
- the filterclientClass
- the client classconf
- the configuration for message deliveryresultHandler
- the result handlernull
- do not usestatic <T> T getServiceProxyWithJsonFilter(ServiceDiscovery discovery, JsonObject filter, Class<T> clientClass, Handler<AsyncResult<T>> resultHandler)
clientClass
set with the expected set of client. This is important for usages not using Java so
you can pass the expected type.T
- the type of the client classdiscovery
- the service discoveryfilter
- the filter as json objectclientClass
- the client classresultHandler
- the result handlernull
- do not usestatic <T> T getServiceProxyWithJsonFilter(ServiceDiscovery discovery, JsonObject filter, Class<T> clientClass, JsonObject conf, Handler<AsyncResult<T>> resultHandler)
clientClass
set with the expected set of client. This is important for usages not using Java so
you can pass the expected type.T
- the type of the client classdiscovery
- the service discoveryfilter
- the filter as json objectclientClass
- the client classconf
- the configuration for message deliveryresultHandler
- the result handlernull
- do not useCopyright © 2024 Eclipse. All rights reserved.