object Service
- Alphabetic
- By Inheritance
- Service
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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 clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def const[Rep](rep: Future[Rep]): Service[Any, Rep]
A service with a constant reply.
A service with a constant reply. Always available; never closable.
- See also
constant for a Java compatible API.
- def constant[Rep](rep: Future[Rep]): Service[Any, Rep]
Java compatible API for const as
const
is a reserved word in Java - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def mk[Req, Rep](f: (Req) => Future[Rep]): Service[Req, Rep]
A convenience method for creating
Services
from aFunction1
ofReq
to aFuture[Rep]
. - final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def pending[Req, Rep](svc: Future[Service[Req, Rep]]): Service[Req, Rep]
A future of a service is a pending service.
A future of a service is a pending service.
Requests wait behind resolution of the future. If resolution fails, all requests to this service reflect the same failure. While resolution is pending, the status of the service is Busy, otherwise it's whatever the underlying service reports.
Closing the service is uninterruptible and instant: failing all subsequent requests, and interrupting those in flight. Close returns Future.Done always, independent of the underlying service.
val svc = Service.pending(Future.never) val rep = svc(1) val closed = svc.close() Await.result(closed) // Future.Done Await.result(rep) // Exception: Service is closed
Note: Because queued requests rely on queue order of future callbacks, it's not guaranteed that requests to the underlying service will be received in the same order they were sent.
- def rescue[Req, Rep](service: Service[Req, Rep]): ServiceProxy[Req, Rep]
Wrap the given service such that any synchronously thrown
NonFatal
exceptions are lifted intoFuture.exceptions
. - 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(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()