Trait

com.twitter.scrooge

ThriftMethod

Related Doc: package scrooge

Permalink

trait ThriftMethod extends AnyRef

Metadata for a method for a Thrift service.

Comments below will use this example IDL:

service ExampleService {
  i32 boringMethod(
    1: i32 input1,
    2: string input2
  )
}
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ThriftMethod
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. abstract type Args <: ThriftStruct

    Permalink

    A struct wrapping method arguments

    A struct wrapping method arguments

    For Scala generated code this will be a wrapper around all of the inputs. Roughly:

    class Args(input1: Int, input2: String) extends ThriftStruct
  2. abstract type FunctionType

    Permalink

    The type of this method, as a function.

    The type of this method, as a function.

    For Scala generated code with Finagle bindings this will be roughly:

    Function1[Args, Future[Int]]

    For Scala generated code without Finagle bindings, this will be Nothing.

  3. abstract type ReqRepFunctionType

    Permalink

    The type of this method, as a function.

    The type of this method, as a function.

    For Scala generated code with Finagle bindings this will be roughly:

    Function1[scrooge.Request[Args], Future[scrooge.Response[Int]]]

    For Scala generated code without Finagle bindings, this will be Nothing.

  4. abstract type ReqRepServicePerEndpointServiceType

    Permalink

    The type of this method, as a Finagle Service from scrooge.Request[Args] to scrooge.Response[SuccessType].

    The type of this method, as a Finagle Service from scrooge.Request[Args] to scrooge.Response[SuccessType].

    For Scala generated code with Finagle bindings this will be roughly: Service[scrooge.Request[Args], scrooge.Response[SuccessType]].

    For Scala generated code without Finagle bindings, this will be Nothing.

  5. abstract type Result <: ThriftResponse[SuccessType] with ThriftStruct

    Permalink

    Contains success or thrift application exceptions

  6. abstract type ServicePerEndpointServiceType

    Permalink

    The type of this method, as a Finagle Service from Args to SuccessType.

    The type of this method, as a Finagle Service from Args to SuccessType.

    For Scala generated code with Finagle bindings this will be roughly: Service[Args, SuccessType].

    For Scala generated code without Finagle bindings, this will be Nothing.

  7. abstract type SuccessType

    Permalink

    The successful return type

    The successful return type

    For Scala generated code this will be the response's type. Roughly:

    type SuccessType = Int
  8. abstract type ServiceIfaceServiceType

    Permalink

    The type of this method, as a Finagle Service from Args to SuccessType.

    The type of this method, as a Finagle Service from Args to SuccessType.

    For Scala generated code with Finagle bindings this will be roughly: Service[Args, SuccessType].

    For Scala generated code without Finagle bindings, this will be Nothing.

    Annotations
    @deprecated
    Deprecated

    (Since version 2017-12-18) Use ServicePerEndpointServiceType

Abstract Value Members

  1. abstract def annotations: Map[String, String]

    Permalink

    Thrift annotations (user-defined key-value metadata) on the method

  2. abstract def argsCodec: ThriftStructCodec3[Args]

    Permalink

    Codec for the request args

  3. abstract def name: String

    Permalink

    Thrift method name

  4. abstract def oneway: Boolean

    Permalink

    True for oneway thrift methods

  5. abstract def responseCodec: ThriftStructCodec3[Result]

    Permalink

    Codec for the response

  6. abstract def serviceName: String

    Permalink

    Thrift service name.

    Thrift service name. A thrift service is a list of methods.

  7. abstract def toReqRepServicePerEndpointService(f: ReqRepFunctionType): ReqRepServicePerEndpointServiceType

    Permalink

    Convert a function implementation of this method into a ReqRepServicePerEndpoint Finagle Service implementation returning scrooge.Response[SuccessType].

    Convert a function implementation of this method into a ReqRepServicePerEndpoint Finagle Service implementation returning scrooge.Response[SuccessType].

    For Scala generated code without Finagle bindings, this will not implemented.

  8. abstract def toServicePerEndpointService(f: FunctionType): ServicePerEndpointServiceType

    Permalink

    Convert a function implementation of this method into a ServicePerEndpoint Finagle Service implementation returning SuccessType.

    Convert a function implementation of this method into a ServicePerEndpoint Finagle Service implementation returning SuccessType.

    For Scala generated code without Finagle bindings, this will not implemented.

  9. abstract def toServiceIfaceService(f: FunctionType): ServiceIfaceServiceType

    Permalink

    Convert a function implementation of this method into a ServiceIface Service implementation returning SuccessType.

    Convert a function implementation of this method into a ServiceIface Service implementation returning SuccessType.

    For Scala generated code without Finagle bindings, this will not implemented.

    Annotations
    @deprecated
    Deprecated

    (Since version 2017-12-18) Use toServicePerEndpointService(f: FunctionType

Concrete 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. final def asInstanceOf[T0]: T0

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

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

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

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped