class ServiceReference extends AnyRef
Once a consumer has chosen a service, it builds a io.vertx.scala.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 io.vertx.scala.servicediscovery.ServiceReference#get method * release the reference - so the binding between the consumer and the provider is removed
- Alphabetic
- By Inheritance
- ServiceReference
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new ServiceReference(_asJava: AnyRef)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asJava: AnyRef
-
def
cached[T]()(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): T
Gets the service object if already retrieved.
Gets the service object if already retrieved. It won't try to acquire the service object if not retrieved yet.
- returns
the object,
null
if not yet retrieved
-
def
cachedAs[X](x: Class[X])(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[X]): X
Gets the service object if already retrieved.
Gets the service object if already retrieved. It won't try to acquire the service object if not retrieved yet. Unlike io.vertx.scala.servicediscovery.ServiceReference#cached, this method return the warpped object to the desired (given) type.
- x
the type of object
- returns
the object,
null
if not yet retrieved
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
get[T]()(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): T
Gets the object to access the service.
Gets the object to access the service. It can be a proxy, a client or whatever object. The type depends on the service type and the server itself. This method returns the Java version and primary facet of the object, use io.vertx.scala.servicediscovery.ServiceReference#getAs to retrieve the polyglot instance of the object or another facet..
- returns
the object to access the service
-
def
getAs[X](x: Class[X])(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[X]): X
Gets the object to access the service.
Gets the object to access the service. It can be a proxy, a client or whatever object. The type depends on the service type and the server itself. This method wraps the service object into the desired type.
- x
the type of object
- returns
the object to access the service wrapped to the given type
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
def
isHolding(object: AnyRef): Boolean
Checks whether or not the service reference has the given service object.
Checks whether or not the service reference has the given service object.
- object
the service object, must not be
null
- returns
true
if the service reference service object is equal to the given object,false
otherwise.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
record(): Record
- returns
the service record.see Record
-
def
release(): Unit
Releases the reference.
Releases the reference. Once released, the consumer must not use the reference anymore. This method must be idempotent and defensive, as multiple call may happen.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )