object ThriftReqRepServicePerEndpoint
Construct Service[scrooge.Request[method.Args],scrooge.Response[method.SuccessType]]
interface for a ThriftMethod.
There are two ways to use a Scrooge-generated Thrift Service
with Finagle:
1. Using a Service interface, i.e. a collection of Finagle Services
, e.g., ReqRepServicePerEndpoint.
2. Using a method interface, i.e. a collection of methods returning Futures
, e.g, MethodPerEndpoint.
Example: for a Thrift service IDL:
service Logger { string log(1: string message, 2: i32 logLevel); i32 getLogSize(); }
the Service
interface, or ReqRepServicePerEndpoint
, is
trait LoggerServiceIface { val log: com.twitter.finagle.Service[scrooge.Request[Logger.Log.Args], scrooge.Response[Logger.Log.SuccessType]] val getLogSize: com.twitter.finagle.Service[[scrooge.Request[Logger.GetLogSize.Args], scrooge.Response[Logger.GetLogSize.SuccessType]] }
and the method interface, or MethodPerEndpoint
, is
trait Logger.MethodPerEndpoint { def log(message: String, logLevel: Int): Future[String] def getLogSize(): Future[Int] }
ReqRepServicePerEndpoints can be modified and composed with Finagle Filters
.
- Alphabetic
- By Inheritance
- ThriftReqRepServicePerEndpoint
- 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
- def apply(method: ThriftMethod, thriftService: Service[ThriftClientRequest, Array[Byte]], clientParam: RichClientParam): Service[Request[Args], Response[SuccessType]]
Build a
Service[scrooge.Request[method.Args],scrooge.Response[method.SuccessType]]
from a given ThriftMethod. - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- 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
- 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()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def transformResult[A](result: Try[Response[A]]): Future[A]
Transform a
scrooge.Response[A]
to aFuture[A]
.Transform a
scrooge.Response[A]
to aFuture[A]
.- result
scrooge.Response to transform.
- returns
a
Future[A]
of the result or exception.
- 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()