Class ServiceProxyBuilder
java.lang.Object
io.vertx.serviceproxy.ServiceProxyBuilder
A builder for Service Proxies which state can be reused during the builder lifecycle.
- Author:
- Paulo Lopes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TCreates a proxy to a service on the event bus.setAddress(String address) Set the address to use on the subsequent proxy creations or service registrations.setOptions(DeliveryOptions options) Set delivery options to be used during a proxy call.Set a JWT token to be used on proxy calls.
-
Constructor Details
-
ServiceProxyBuilder
Creates a builder.- Parameters:
vertx- a non null instance of vertx.
-
-
Method Details
-
setAddress
Set the address to use on the subsequent proxy creations or service registrations.- Parameters:
address- an eventbus address- Returns:
- self
-
setToken
Set a JWT token to be used on proxy calls.- Parameters:
token- a JWT token- Returns:
- self
-
setOptions
Set delivery options to be used during a proxy call.- Parameters:
options- delivery options- Returns:
- self
-
build
Creates a proxy to a service on the event bus.- Type Parameters:
T- the type of the service interface- Parameters:
clazz- the service class (interface)- Returns:
- a proxy to the service
-