Object

com.twitter.finagle.thrift.service

ThriftReqRepServicePerEndpoint

Related Doc: package service

Permalink

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[Future] {
  def log(message: String, logLevel: Int): Future[String]
  def getLogSize(): Future[Int]
}

ReqRepServicePerEndpoints can be modified and composed with Finagle Filters.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ThriftReqRepServicePerEndpoint
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def apply(method: ThriftMethod, thriftService: Service[ThriftClientRequest, Array[Byte]], clientParam: RichClientParam): Service[Request[Args], Response[SuccessType]]

    Permalink

    Build a Service[scrooge.Request[method.Args],scrooge.Response[method.SuccessType]] from a given ThriftMethod.

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  17. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  18. def transformResult[A](result: Try[Response[A]]): Future[A]

    Permalink

    Transform a scrooge.Response[A] to a Future[A].

    Transform a scrooge.Response[A] to a Future[A].

    result

    scrooge.Response to transform.

    returns

    a Future[A] of the result or exception.

  19. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped