Packages

c

com.twitter.inject.thrift.modules

ThriftMethodBuilderClientModule

abstract class ThriftMethodBuilderClientModule[ServicePerEndpoint <: Filterable[ServicePerEndpoint], MethodPerEndpoint] extends TwitterModule with ThriftClientModuleTrait

A TwitterModule which allows for configuration of a ThriftMux client. The client interface can be expressed as a service-per-endpoint or a MethodPerEndpoint.

Provides bindings for a Scrooge-generated service-per-endpoint and MethodPerEndpoint. The MethodPerEndpoint is constructed via the MethodPerEndpointBuilder and is thus implemented as a thin wrapper over the service-per-endpoint.

This TwitterModule allows users to configure and filter a Scrooge-generated service-per-endpoint per-method which can then be used directly or can be wrapped by a MethodPerEndpoint.

ServicePerEndpoint

A Scrooge-generated ServicePerEndpoint

MethodPerEndpoint

A Scrooge-generated MethodPerEndpoint

Note

When applying filters, filter order matters. The order in which filters are applied is the order in which requests will flow through to the service and the opposite of the order in which responses return. See the ThriftMethodBuilderFactory for more information.

,

This TwitterModule expects a com.twitter.finagle.thrift.ClientId to be bound to the object graph but does not assume how it is done. A com.twitter.finagle.thrift.ClientId can be bound by including the ThriftClientIdModule in your server configuration.

See also

MethodPerEndpoint

ServicePerEndpoint

ReqRepServicePerEndpoint

Finagle Clients

What is ThriftMux?

Linear Supertypes
ThriftClientModuleTrait, StackClientModuleTrait[ThriftClientRequest, Array[Byte], Client], TwitterModule, TwitterBaseModule, TwitterModuleLifecycle, Logging, util.logging.Logging, TwitterModuleFlags, AbstractModule, Module, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ThriftMethodBuilderClientModule
  2. ThriftClientModuleTrait
  3. StackClientModuleTrait
  4. TwitterModule
  5. TwitterBaseModule
  6. TwitterModuleLifecycle
  7. Logging
  8. Logging
  9. TwitterModuleFlags
  10. AbstractModule
  11. Module
  12. AnyRef
  13. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ThriftMethodBuilderClientModule()(implicit servicePerEndpointBuilder: ServicePerEndpointBuilder[ServicePerEndpoint], methodPerEndpointBuilder: MethodPerEndpointBuilder[ServicePerEndpoint, MethodPerEndpoint])

Abstract Value Members

  1. abstract def dest: String
    Definition Classes
    StackClientModuleTrait
  2. abstract def label: String
    Definition Classes
    StackClientModuleTrait

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addError(arg0: Message): Unit
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  5. def addError(arg0: Throwable): Unit
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  6. def addError(arg0: String, arg1: <repeated...>[AnyRef]): Unit
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
    Annotations
    @transient()
  7. def addTypeConverter[T](converter: TypeConverter)(implicit arg0: Manifest[T]): Unit
    Attributes
    protected
    Definition Classes
    TwitterModule
  8. def asClosable(client: Client): Closable
    Attributes
    protected
    Definition Classes
    ThriftClientModuleTrait → StackClientModuleTrait
  9. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  10. final def baseClient: Client
    Attributes
    protected
    Definition Classes
    ThriftClientModuleTrait → StackClientModuleTrait
  11. def bind[T, A <: Annotation](implicit arg0: Manifest[T], arg1: Manifest[A]): ScalaAnnotatedBindingBuilder[T]
    Attributes
    protected
    Definition Classes
    TwitterModule
  12. def bind[T](annotation: Annotation)(implicit arg0: Manifest[T]): ScalaAnnotatedBindingBuilder[T]
    Attributes
    protected
    Definition Classes
    TwitterModule
  13. def bind[T](implicit arg0: Manifest[T]): ScalaAnnotatedBindingBuilder[T]
    Attributes
    protected
    Definition Classes
    TwitterModule
  14. def bind[T](arg0: Class[T]): AnnotatedBindingBuilder[T]
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  15. def bind[T](arg0: TypeLiteral[T]): AnnotatedBindingBuilder[T]
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  16. def bind[T](arg0: Key[T]): LinkedBindingBuilder[T]
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  17. def bindAssistedFactory[T]()(implicit arg0: Manifest[T]): Unit
    Attributes
    protected
    Definition Classes
    TwitterModule
  18. def bindConstant(): AnnotatedConstantBindingBuilder
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  19. def bindInterceptor(arg0: Matcher[_ >: Class[_]], arg1: Matcher[_ >: Method], arg2: <repeated...>[MethodInterceptor]): Unit
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
    Annotations
    @transient()
  20. def bindListener(arg0: Matcher[_ >: Binding[_]], arg1: <repeated...>[ProvisionListener]): Unit
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
    Annotations
    @transient()
  21. def bindListener(arg0: Matcher[_ >: TypeLiteral[_]], arg1: TypeListener): Unit
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  22. def bindScope(arg0: Class[_ <: Annotation], arg1: Scope): Unit
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  23. def bindSingleton[T, A <: Annotation](implicit arg0: Manifest[T], arg1: Manifest[A]): ScalaAnnotatedBindingBuilder[T]
    Attributes
    protected
    Definition Classes
    TwitterModule
  24. def bindSingleton[T](annotation: Annotation)(implicit arg0: Manifest[T]): ScalaAnnotatedBindingBuilder[T]
    Attributes
    protected
    Definition Classes
    TwitterModule
  25. def bindSingleton[T](implicit arg0: Manifest[T]): ScalaAnnotatedBindingBuilder[T]
    Attributes
    protected
    Definition Classes
    TwitterModule
  26. def binder(): Binder
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  27. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  28. def closeOnExit(f: ⇒ Unit): Unit
    Attributes
    protected
    Definition Classes
    TwitterModuleLifecycle
  29. def configure(): Unit
    Attributes
    protected
    Definition Classes
    TwitterModule → AbstractModule
  30. final def configure(arg0: Binder): Unit
    Definition Classes
    AbstractModule → Module
  31. final def configureClient(injector: Injector, client: Client): Client
    Attributes
    protected
    Definition Classes
    ThriftClientModuleTrait → StackClientModuleTrait
  32. def configureMethodBuilder(injector: Injector, methodBuilder: MethodBuilder): MethodBuilder

    This method allows for extended configuration of the base MethodBuilder (e.g., the MethodBuilder used as a starting point for all method configurations) not exposed by this module or for overriding provided defaults, e.g.,

    This method allows for extended configuration of the base MethodBuilder (e.g., the MethodBuilder used as a starting point for all method configurations) not exposed by this module or for overriding provided defaults, e.g.,

    override def configureMethodBuilder(methodBuilder: thriftmux.MethodBuilder): thriftmux.MethodBuilder = {
      methodBuilder
        .withTimeoutTotal(5.seconds)
    }

    Note: any configuration here will be applied to all methods unless explicitly overridden. However, also note that filters are cumulative. Thus filters added here will be present in any final configuration.

    injector

    a com.twitter.inject.Injector instance

    methodBuilder

    the thriftmux.MethodBuilder to configure.

    returns

    a configured MethodBuilder which will be used as the starting point for any per-method configuration.

    Attributes
    protected
  33. def configureServicePerEndpoint(injector: Injector, builder: ThriftMethodBuilderFactory[ServicePerEndpoint], servicePerEndpoint: ServicePerEndpoint): ServicePerEndpoint

    Configure the ServicePerEndpoint.

    Configure the ServicePerEndpoint. This is done by using the given ThriftMethodBuilderFactory to configure a com.twitter.inject.thrift.ThriftMethodBuilder for a given ThriftMethod. E.g.,

    servicePerEndpoint
      .withFetchBlob(
        builder.method(FetchBlob)
        ...

    Subclasses of this module MAY provide an implementation of configureServicePerEndpoint which specifies configuration of a ServicePerEndpoint interface per-method of the interface.

    injector

    a com.twitter.inject.Injector instance

    builder

    a ThriftMethodBuilderFactory for creating a com.twitter.inject.thrift.ThriftMethodBuilder.

    servicePerEndpoint

    the ServicePerEndpoint to configure.

    returns

    a per-method filtered ServicePerEndpoint

    Attributes
    protected
    See also

    com.twitter.inject.thrift.ThriftMethodBuilder

  34. def configureThriftMuxClient(injector: Injector, client: Client): Client

    This method allows for further configuration of the ThriftMux client for parameters not exposed by this module or for overriding defaults provided herein, e.g.,

    This method allows for further configuration of the ThriftMux client for parameters not exposed by this module or for overriding defaults provided herein, e.g.,

    override def configureThriftMuxClient(client: ThriftMux.Client): ThriftMux.Client = {
      client
        .withProtocolFactory(myCustomProtocolFactory))
        .withStatsReceiver(someOtherScopedStatsReceiver)
        .withMonitor(myAwesomeMonitor)
        .withTracer(notTheDefaultTracer)
        .withClientId(injector.instance[ClientId])
        .withResponseClassifier(ThriftResponseClassifier.ThriftExceptionsAsFailures)
    }
    injector

    the com.twitter.inject.Injector which can be used to help configure the given com.twitter.finagle.ThriftMux.Client.

    client

    the com.twitter.finagle.ThriftMux.Client to configure.

    returns

    a configured ThriftMux.Client.

    Attributes
    protected
    Definition Classes
    ThriftClientModuleTrait
  35. def convertToTypes(arg0: Matcher[_ >: TypeLiteral[_]], arg1: TypeConverter): Unit
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  36. def createFlag[T](name: String, default: T, help: String, flaggable: Flaggable[T]): Flag[T]
    Attributes
    protected
    Definition Classes
    TwitterModuleFlags
  37. def createKey[T](implicit arg0: Manifest[T]): Key[T]
    Attributes
    protected
    Definition Classes
    TwitterBaseModule
  38. def createMandatoryFlag[T](name: String, help: String, usage: String, flaggable: Flaggable[T]): Flag[T]
    Definition Classes
    TwitterModuleFlags
  39. def createMultiBinder[MultiBindType](implicit arg0: Manifest[MultiBindType]): ScalaMultibinder[MultiBindType]
    Attributes
    protected
    Definition Classes
    TwitterModule
  40. def currentStage(): Stage
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  41. def debug(marker: Marker, message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  42. def debug(message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  43. def debug(marker: Marker, message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  44. def debug(message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  45. def debugFutureResult[T](msg: String)(func: ⇒ Future[T]): Future[T]
    Attributes
    protected
    Definition Classes
    Logging
  46. def debugResult[T](message: ⇒ String)(fn: ⇒ T): T
    Attributes
    protected[this]
    Definition Classes
    Logging
  47. def defaultClosableAwaitPeriod: Duration
    Attributes
    protected
    Definition Classes
    StackClientModuleTrait
  48. def defaultClosableGracePeriod: Duration
    Attributes
    protected
    Definition Classes
    StackClientModuleTrait
  49. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  50. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  51. def error(marker: Marker, message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  52. def error(message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  53. def error(marker: Marker, message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  54. def error(message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  55. def errorResult[T](message: ⇒ String)(fn: ⇒ T): T
    Attributes
    protected[this]
    Definition Classes
    Logging
  56. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  57. def flag[T](name: String, help: String)(implicit arg0: Flaggable[T], arg1: Manifest[T]): Flag[T]
    Attributes
    protected
    Definition Classes
    TwitterModuleFlags
  58. def flag[T](name: String, default: T, help: String)(implicit arg0: Flaggable[T]): Flag[T]
    Attributes
    protected
    Definition Classes
    TwitterModuleFlags
  59. val flags: ArrayBuffer[Flag[_]]
    Attributes
    protected[com.twitter.inject]
    Definition Classes
    TwitterModuleFlags
  60. def frameworkConfigureClient(injector: Injector, client: Client): Client
    Attributes
    protected[com.twitter]
    Definition Classes
    StackClientModuleTrait
  61. def frameworkModules: Seq[Module]
    Attributes
    protected[com.twitter.inject]
    Definition Classes
    TwitterBaseModule
  62. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  63. def getMembersInjector[T](arg0: TypeLiteral[T]): MembersInjector[T]
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  64. def getMembersInjector[T](arg0: Class[T]): MembersInjector[T]
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  65. def getProvider[T](implicit arg0: Manifest[T]): Provider[T]
    Attributes
    protected
    Definition Classes
    TwitterModule
  66. def getProvider[T](arg0: Class[T]): Provider[T]
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  67. def getProvider[T](arg0: Key[T]): Provider[T]
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  68. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  69. def info(marker: Marker, message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  70. def info(message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  71. def info(marker: Marker, message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  72. def info(message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  73. def infoResult[T](message: ⇒ String)(fn: ⇒ T): T
    Attributes
    protected[this]
    Definition Classes
    Logging
  74. final def initialClientConfiguration(injector: Injector, client: Client, statsReceiver: StatsReceiver): Client
    Attributes
    protected
    Definition Classes
    ThriftMethodBuilderClientModule → StackClientModuleTrait
  75. def install(module: Module): Unit
    Attributes
    protected
    Definition Classes
    TwitterModule → AbstractModule
  76. def isDebugEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  77. def isDebugEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  78. def isErrorEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  79. def isErrorEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  80. def isInfoEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  81. def isInfoEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  82. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  83. def isTraceEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  84. def isTraceEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  85. def isWarnEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  86. def isWarnEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  87. def javaModules: Collection[Module]
    Attributes
    protected[com.twitter.inject]
    Definition Classes
    TwitterBaseModule
  88. final def logger: Logger
    Attributes
    protected[this]
    Definition Classes
    Logging
  89. final def loggerName: String
    Attributes
    protected[this]
    Definition Classes
    Logging
  90. def modules: Seq[Module]
    Attributes
    protected[com.twitter.inject]
    Definition Classes
    TwitterBaseModule
  91. def monitor: Monitor
    Attributes
    protected
    Definition Classes
    StackClientModuleTrait
  92. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  93. final def newClient(injector: Injector, statsReceiver: StatsReceiver): Client
    Attributes
    protected
    Definition Classes
    StackClientModuleTrait
  94. final def newService(injector: Injector, statsReceiver: StatsReceiver): Service[ThriftClientRequest, Array[Byte]]
    Attributes
    protected
    Definition Classes
    StackClientModuleTrait
  95. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  96. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  97. final def providesMethodPerEndpoint(servicePerEndpoint: ServicePerEndpoint): MethodPerEndpoint
    Annotations
    @Provides() @Singleton()
  98. final def providesServicePerEndpoint(injector: Injector, clientId: ClientId, statsReceiver: StatsReceiver): ServicePerEndpoint
    Annotations
    @Provides() @Singleton()
  99. def requestInjection(arg0: Any): Unit
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  100. def requestStaticInjection(arg0: <repeated...>[Class[_]]): Unit
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
    Annotations
    @transient()
  101. def requestTimeout: Duration
    Attributes
    protected
    Definition Classes
    StackClientModuleTrait
  102. def requireBinding(arg0: Class[_]): Unit
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  103. def requireBinding(arg0: Key[_]): Unit
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  104. def retryBudget: RetryBudget
    Attributes
    protected
    Definition Classes
    StackClientModuleTrait
  105. def sessionAcquisitionTimeout: Duration
    Attributes
    protected
    Definition Classes
    StackClientModuleTrait
  106. def singletonPostWarmupComplete(injector: Injector): Unit
    Attributes
    protected[com.twitter.inject]
    Definition Classes
    TwitterModuleLifecycle
  107. def singletonShutdown(injector: Injector): Unit
    Attributes
    protected[com.twitter.inject]
    Definition Classes
    TwitterModuleLifecycle
  108. def singletonStartup(injector: Injector): Unit
    Attributes
    protected[com.twitter.inject]
    Definition Classes
    TwitterModuleLifecycle
  109. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  110. def time[T](formatStr: String)(func: ⇒ T): T
    Attributes
    protected
    Definition Classes
    Logging
  111. def toString(): String
    Definition Classes
    AnyRef → Any
  112. def trace(marker: Marker, message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  113. def trace(message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  114. def trace(marker: Marker, message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  115. def trace(message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  116. def traceResult[T](message: ⇒ String)(fn: ⇒ T): T
    Attributes
    protected[this]
    Definition Classes
    Logging
  117. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  118. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  119. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  120. def warn(marker: Marker, message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  121. def warn(message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  122. def warn(marker: Marker, message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  123. def warn(message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  124. def warnResult[T](message: ⇒ String)(fn: ⇒ T): T
    Attributes
    protected[this]
    Definition Classes
    Logging

Inherited from ThriftClientModuleTrait

Inherited from StackClientModuleTrait[ThriftClientRequest, Array[Byte], Client]

Inherited from TwitterModule

Inherited from TwitterBaseModule

Inherited from TwitterModuleLifecycle

Inherited from Logging

Inherited from util.logging.Logging

Inherited from TwitterModuleFlags

Inherited from AbstractModule

Inherited from Module

Inherited from AnyRef

Inherited from Any

Ungrouped