Once a consumer has chosen a service, it builds a @see \io\vertx\jphp\servicediscovery\ServiceReference managing the binding with the chosen service provider.
The reference lets the consumer: * access the service (via a proxy or a client) with the @see \io\vertx\jphp\servicediscovery\ServiceReference::get method * release the reference - so the binding between the consumer and the provider is removed
package |
Default |
---|
__construct()
cached() : mixed
mixed
the object, {@code null} if not yet retrieved
cachedAs( $arg0) : mixed
Unlike @see \io\vertx\jphp\servicediscovery\ServiceReference::cached, this method return the warpped object to the desired (given) type.
string
mixed
the object, {@code null} if not yet retrieved
get() : mixed
see |
\io\vertx\jphp\servicediscovery\ServiceReference::getAs
to retrieve the polyglot instance of the object or another facet.. |
---|---|
mixed
the object to access the service
getAs( $arg0) : mixed
string
mixed
the object to access the service wrapped to the given type
isHolding( $arg0) : boolean
mixed
boolean
{@code true} if the service reference service object is equal to the given object, {@code false} otherwise.
record() : \io\vertx\jphp\servicediscovery\Record
release() : void
This method must be idempotent and defensive, as multiple call may happen.