Class

com.twitter.inject.thrift.modules

ThriftMethodBuilderClientModule

Related Doc: package modules

Permalink

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

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.

,

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.

See also

What is ThriftMux?

Finagle Clients

ReqRepServicePerEndpoint

ServicePerEndpoint

MethodPerEndpoint

Linear Supertypes
ThriftClientModuleTrait, TwitterModule, Logging, util.logging.Logging, TwitterBaseModule, TwitterModuleLifecycle, TwitterModuleFlags, AbstractModule, Module, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ThriftMethodBuilderClientModule
  2. ThriftClientModuleTrait
  3. TwitterModule
  4. Logging
  5. Logging
  6. TwitterBaseModule
  7. TwitterModuleLifecycle
  8. TwitterModuleFlags
  9. AbstractModule
  10. Module
  11. AnyRef
  12. 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])

    Permalink

Abstract Value Members

  1. abstract def dest: String

    Permalink

    Destination of ThriftMux client.

    Destination of ThriftMux client.

    Definition Classes
    ThriftClientModuleTrait
    See also

    Names and Naming in Finagle

  2. abstract def label: String

    Permalink

    ThriftMux client label.

    ThriftMux client label.

    Definition Classes
    ThriftClientModuleTrait
    See also

    Clients Observability

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. def addError(arg0: Message): Unit

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  5. def addError(arg0: Throwable): Unit

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  6. def addError(arg0: String, arg1: <repeated...>[AnyRef]): Unit

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  7. def addTypeConverter[T](converter: TypeConverter)(implicit arg0: Manifest[T]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule
  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. def bind[T, A <: Annotation](implicit arg0: Manifest[T], arg1: Manifest[A]): ScalaAnnotatedBindingBuilder[T]

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule
  10. def bind[T](annotation: Annotation)(implicit arg0: Manifest[T]): ScalaAnnotatedBindingBuilder[T]

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule
  11. def bind[T](implicit arg0: Manifest[T]): ScalaAnnotatedBindingBuilder[T]

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule
  12. def bind[T](arg0: Class[T]): AnnotatedBindingBuilder[T]

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  13. def bind[T](arg0: TypeLiteral[T]): AnnotatedBindingBuilder[T]

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  14. def bind[T](arg0: Key[T]): LinkedBindingBuilder[T]

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  15. def bindAssistedFactory[T]()(implicit arg0: Manifest[T]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule
  16. def bindConstant(): AnnotatedConstantBindingBuilder

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  17. def bindInterceptor(arg0: Matcher[_ >: Class[_]], arg1: Matcher[_ >: Method], arg2: <repeated...>[MethodInterceptor]): Unit

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  18. def bindListener(arg0: Matcher[_ >: Binding[_]], arg1: <repeated...>[ProvisionListener]): Unit

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  19. def bindListener(arg0: Matcher[_ >: TypeLiteral[_]], arg1: TypeListener): Unit

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  20. def bindScope(arg0: Class[_ <: Annotation], arg1: Scope): Unit

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  21. def bindSingleton[T, A <: Annotation](implicit arg0: Manifest[T], arg1: Manifest[A]): ScalaAnnotatedBindingBuilder[T]

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule
  22. def bindSingleton[T](annotation: Annotation)(implicit arg0: Manifest[T]): ScalaAnnotatedBindingBuilder[T]

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule
  23. def bindSingleton[T](implicit arg0: Manifest[T]): ScalaAnnotatedBindingBuilder[T]

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule
  24. def binder(): Binder

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  25. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. def configure(): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule → AbstractModule
  27. final def configure(arg0: Binder): Unit

    Permalink
    Definition Classes
    AbstractModule → Module
  28. def configureMethodBuilder(methodBuilder: MethodBuilder): MethodBuilder

    Permalink

    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.

    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
  29. def configureServicePerEndpoint(builder: ThriftMethodBuilderFactory[ServicePerEndpoint], servicePerEndpoint: ServicePerEndpoint): ServicePerEndpoint

    Permalink

    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.

    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

  30. def configureThriftMuxClient(client: Client): Client

    Permalink

    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)
        .withResponseClassifier(ThriftResponseClassifier.ThriftExceptionsAsFailures)
    }
    client

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

    returns

    a configured ThriftMux.Client.

    Attributes
    protected
    Definition Classes
    ThriftMethodBuilderClientModule → ThriftClientModuleTrait
  31. def convertToTypes(arg0: Matcher[_ >: TypeLiteral[_]], arg1: TypeConverter): Unit

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  32. def createKey[T](implicit arg0: Manifest[T]): Key[T]

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterBaseModule
  33. def createMultiBinder[MultiBindType](implicit arg0: Manifest[MultiBindType]): ScalaMultibinder[MultiBindType]

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule
  34. def currentStage(): Stage

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  35. def debug(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  36. def debug(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  37. def debug(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  38. def debug(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  39. def debugFutureResult[T](msg: String)(func: ⇒ Future[T]): Future[T]

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  40. def debugResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  41. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  43. def error(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  44. def error(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  45. def error(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  46. def error(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  47. def errorResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  48. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  49. def flag[T](name: String, help: String)(implicit arg0: Flaggable[T], arg1: Manifest[T]): Flag[T]

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModuleFlags
  50. def flag[T](name: String, default: T, help: String)(implicit arg0: Flaggable[T]): Flag[T]

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModuleFlags
  51. val flags: ArrayBuffer[Flag[_]]

    Permalink
    Attributes
    protected[com.twitter.inject]
    Definition Classes
    TwitterModuleFlags
  52. def frameworkModules: Seq[Module]

    Permalink
    Attributes
    protected[com.twitter.inject]
    Definition Classes
    TwitterBaseModule
  53. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  54. def getMembersInjector[T](arg0: TypeLiteral[T]): MembersInjector[T]

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  55. def getMembersInjector[T](arg0: Class[T]): MembersInjector[T]

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  56. def getProvider[T](implicit arg0: Manifest[T]): Provider[T]

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule
  57. def getProvider[T](arg0: Class[T]): Provider[T]

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  58. def getProvider[T](arg0: Key[T]): Provider[T]

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  59. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  60. def info(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  61. def info(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  62. def info(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  63. def info(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  64. def infoResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  65. def install(module: Module): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule → AbstractModule
  66. def isDebugEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  67. def isDebugEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  68. def isErrorEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  69. def isErrorEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  70. def isInfoEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  71. def isInfoEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  72. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  73. def isTraceEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  74. def isTraceEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  75. def isWarnEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  76. def isWarnEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  77. def logger: Logger

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  78. def loggerName: String

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  79. def modules: Seq[Module]

    Permalink
    Attributes
    protected[com.twitter.inject]
    Definition Classes
    TwitterBaseModule
  80. def monitor: Monitor

    Permalink

    Function to add a user-defined Monitor.

    Function to add a user-defined Monitor. A com.twitter.finagle.util.DefaultMonitor will be installed implicitly which handles all exceptions caught in the stack. Exceptions that are not handled by a user-defined monitor are propagated to the com.twitter.finagle.util.DefaultMonitor.

    NullMonitor has no influence on DefaultMonitor behavior here.

    Attributes
    protected
    Definition Classes
    ThriftMethodBuilderClientModule → ThriftClientModuleTrait
  81. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  84. final def providesMethodPerEndpoint(servicePerEndpoint: ServicePerEndpoint): MethodPerEndpoint

    Permalink
    Annotations
    @Provides() @Singleton()
  85. final def providesServicePerEndpoint(injector: Injector, clientId: ClientId, statsReceiver: StatsReceiver): ServicePerEndpoint

    Permalink
    Annotations
    @Provides() @Singleton()
  86. def requestInjection(arg0: Any): Unit

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  87. def requestStaticInjection(arg0: <repeated...>[Class[_]]): Unit

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  88. def requestTimeout: Duration

    Permalink

    Configures a "global" request timeout on the ThriftMux client (default: unbounded).

    Configures a "global" request timeout on the ThriftMux client (default: unbounded). This will set *all* requests to *every* method to have the same total timeout.

    returns

    a Duration which represents the total request timeout

    Attributes
    protected
    Definition Classes
    ThriftMethodBuilderClientModule → ThriftClientModuleTrait
    See also

    https://twitter.github.io/finagle/guide/Clients.html#timeouts-expiration

    com.twitter.finagle.param.CommonParams.withRequestTimeout

  89. def requireBinding(arg0: Class[_]): Unit

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  90. def requireBinding(arg0: Key[_]): Unit

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  91. def retryBudget: Budget

    Permalink

    Default com.twitter.finagle.service.RetryBudget.

    Default com.twitter.finagle.service.RetryBudget. It is highly recommended that budgets be shared between all filters that retry or re-queue requests to prevent retry storms.

    returns

    a default com.twitter.finagle.service.RetryBudget

    Attributes
    protected
    Definition Classes
    ThriftMethodBuilderClientModule → ThriftClientModuleTrait
    See also

    https://twitter.github.io/finagle/guide/Clients.html#retries

  92. def sessionAcquisitionTimeout: Duration

    Permalink

    Configures the session acquisition timeout of this client (default: unbounded).

    Configures the session acquisition timeout of this client (default: unbounded).

    returns

    a Duration which represents the acquisition timeout

    Attributes
    protected
    Definition Classes
    ThriftMethodBuilderClientModule → ThriftClientModuleTrait
    See also

    https://twitter.github.io/finagle/guide/Clients.html#timeouts-expiration

    com.twitter.finagle.param.ClientSessionParams.acquisitionTimeout

  93. def singletonPostWarmupComplete(injector: Injector): Unit

    Permalink
    Attributes
    protected[com.twitter.inject]
    Definition Classes
    TwitterModuleLifecycle
  94. def singletonShutdown(injector: Injector): Unit

    Permalink
    Attributes
    protected[com.twitter.inject]
    Definition Classes
    TwitterModuleLifecycle
  95. def singletonStartup(injector: Injector): Unit

    Permalink
    Attributes
    protected[com.twitter.inject]
    Definition Classes
    TwitterModuleLifecycle
  96. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  97. def time[T](formatStr: String)(func: ⇒ T): T

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  98. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  99. def trace(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  100. def trace(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  101. def trace(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  102. def trace(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  103. def traceResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  104. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  107. def warn(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  108. def warn(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  109. def warn(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  110. def warn(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  111. def warnResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging

Inherited from ThriftClientModuleTrait

Inherited from TwitterModule

Inherited from Logging

Inherited from util.logging.Logging

Inherited from TwitterBaseModule

Inherited from TwitterModuleLifecycle

Inherited from TwitterModuleFlags

Inherited from AbstractModule

Inherited from Module

Inherited from AnyRef

Inherited from Any

Ungrouped