Package io.vertx.mutiny.servicediscovery
Class ServiceReference
- java.lang.Object
 - 
- io.vertx.mutiny.servicediscovery.ServiceReference
 
 
- 
public class ServiceReference extends Object
Once a consumer has chosen a service, it builds aServiceReferencemanaging the binding with the chosen service provider.The reference lets the consumer: * access the service (via a proxy or a client) with the
NOTE: This class has been automatically generated from theget()method * release the reference - so the binding between the consumer and the provider is removedoriginalnon Mutiny-ified interface using Vert.x codegen. 
- 
- 
Field Summary
Fields Modifier and Type Field Description static TypeArg<ServiceReference>__TYPE_ARG 
- 
Constructor Summary
Constructors Constructor Description ServiceReference(io.vertx.servicediscovery.ServiceReference delegate)ServiceReference(Object delegate) 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Tcached()<X> XcachedAs(Class<X> x)booleanequals(Object o)<T> Tget()<X> XgetAs(Class<X> x)io.vertx.servicediscovery.ServiceReferencegetDelegate()inthashCode()booleanisHolding(Object object)static ServiceReferencenewInstance(io.vertx.servicediscovery.ServiceReference arg)io.vertx.servicediscovery.Recordrecord()voidrelease()StringtoString() 
 - 
 
- 
- 
Field Detail
- 
__TYPE_ARG
public static final TypeArg<ServiceReference> __TYPE_ARG
 
 - 
 
- 
Constructor Detail
- 
ServiceReference
public ServiceReference(io.vertx.servicediscovery.ServiceReference delegate)
 
- 
ServiceReference
public ServiceReference(Object delegate)
 
 - 
 
- 
Method Detail
- 
getDelegate
public io.vertx.servicediscovery.ServiceReference getDelegate()
 
- 
record
public io.vertx.servicediscovery.Record record()
- Returns:
 - the service record.
 
 
- 
get
public <T> T get()
- Returns:
 - the object to access the service
 
 
- 
getAs
public <X> X getAs(Class<X> x)
- Parameters:
 x- the type of object- Returns:
 - the object to access the service wrapped to the given type
 
 
- 
cachedAs
public <X> X cachedAs(Class<X> x)
- Parameters:
 x- the type of object- Returns:
 - the object, 
nullif not yet retrieved 
 
- 
cached
public <T> T cached()
- Returns:
 - the object, 
nullif not yet retrieved 
 
- 
release
public void release()
 
- 
isHolding
public boolean isHolding(Object object)
- Parameters:
 object- the service object, must not benull- Returns:
 trueif the service reference service object is equal to the given object,falseotherwise.
 
- 
newInstance
public static ServiceReference newInstance(io.vertx.servicediscovery.ServiceReference arg)
 
 - 
 
 -