Class EventBusService
- java.lang.Object
-
- io.vertx.reactivex.servicediscovery.types.EventBusService
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<EventBusService>
__TYPE_ARG
static String
TYPE
Name of the type.static String
UNKNOWN
Unknown type.
-
Constructor Summary
Constructors Constructor Description EventBusService(EventBusService delegate)
EventBusService(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.boolean
equals(Object o)
EventBusService
getDelegate()
static <T> T
getServiceProxy(ServiceDiscovery discovery, 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, 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).int
hashCode()
static EventBusService
newInstance(EventBusService arg)
String
toString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<EventBusService> __TYPE_ARG
-
UNKNOWN
public static final String UNKNOWN
Unknown type.- See Also:
- Constant Field Values
-
TYPE
public static final String TYPE
Name of the type.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EventBusService
public EventBusService(EventBusService delegate)
-
EventBusService
public EventBusService(Object delegate)
-
-
Method Detail
-
getDelegate
public EventBusService getDelegate()
-
createRecord
public static Record createRecord(String name, String address, String itf, JsonObject metadata)
Sugar method to creates a record for this type.The java interface is added to the metadata in the `service.interface` key.
- Parameters:
name
- the name of the service.address
- the event bus address on which the service availableitf
- the Java interface (name)metadata
- the metadata- Returns:
- the created record
-
getServiceProxy
public static <T> T getServiceProxy(ServiceDiscovery discovery, 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). This is a convenient method to avoid explicit lookup and then retrieval of the service. This method requires to have theclientClass
set with the expected set of client. This is important for usages not using Java so you can pass the expected type.- Parameters:
discovery
- the service discoveryfilter
- the filterclientClass
- the client classresultHandler
- the result handler- Returns:
null
- do not use
-
getServiceProxy
public static <T> T getServiceProxy(ServiceDiscovery discovery, 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). This is a convenient method to avoid explicit lookup and then retrieval of the service. This method requires to have theclientClass
set with the expected set of client. This is important for usages not using Java so you can pass the expected type.- Parameters:
discovery
- the service discoveryfilter
- the filterclientClass
- the client classconf
- the configuration for message deliveryresultHandler
- the result handler- Returns:
null
- do not use
-
getServiceProxyWithJsonFilter
public 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). This is a convenient method to avoid explicit lookup and then retrieval of the service. This method requires to have theclientClass
set with the expected set of client. This is important for usages not using Java so you can pass the expected type.- Parameters:
discovery
- the service discoveryfilter
- the filter as json objectclientClass
- the client classresultHandler
- the result handler- Returns:
null
- do not use
-
getServiceProxyWithJsonFilter
public 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). This is a convenient method to avoid explicit lookup and then retrieval of the service. This method requires to have theclientClass
set with the expected set of client. This is important for usages not using Java so you can pass the expected type.- Parameters:
discovery
- the service discoveryfilter
- the filter as json objectclientClass
- the client classconf
- the configuration for message deliveryresultHandler
- the result handler- Returns:
null
- do not use
-
createRecord
public static Record createRecord(String name, String address, String classname)
Creates a record based on the parameters.- Parameters:
name
- the service nameaddress
- the addressclassname
- the payload class- Returns:
- the record
-
newInstance
public static EventBusService newInstance(EventBusService arg)
-
-