Packages

c

com.twitter.inject.thrift.modules

ThriftClientModule

abstract class ThriftClientModule[ThriftService] extends TwitterModule with ThriftClientModuleTrait

A TwitterModule allows users to configure a Finagle ThriftMux client and does NOT provide ability to filter or configure per-method Scrooge-generated interfaces. The client interface can be expressed as a MethodPerEndpoint or higher-kinded interface.

Provides bindings for a Scrooge-generated MethodPerEndpoint or higher-kinded interface.

See the ThriftMethodBuilderClientModule for building a ThriftMux client that allows for filtering and configuration per-method of the Scrooge-generated interface.

ThriftService

A Scrooge-generated MethodPerEndpoint or the higher-kinded type of the Scrooge-generated service, e.g., MyService[Future].

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.

See also

What is ThriftMux?

Finagle Clients

String, label: String)

Linear Supertypes
ThriftClientModuleTrait, TwitterModule, TwitterBaseModule, TwitterModuleLifecycle, Logging, util.logging.Logging, TwitterModuleFlags, AbstractModule, Module, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ThriftClientModule
  2. ThriftClientModuleTrait
  3. TwitterModule
  4. TwitterBaseModule
  5. TwitterModuleLifecycle
  6. Logging
  7. Logging
  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 ThriftClientModule()(implicit arg0: ClassTag[ThriftService])

Abstract Value Members

  1. abstract def dest: String

    Destination of ThriftMux client.

    Destination of ThriftMux client.

    Definition Classes
    ThriftClientModuleTrait
    See also

    Names and Naming in Finagle

  2. abstract def label: String

    ThriftMux client label.

    ThriftMux client label.

    Definition Classes
    ThriftClientModuleTrait
    See also

    Clients Observability

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def bind[T, A <: Annotation](implicit arg0: Manifest[T], arg1: Manifest[A]): ScalaAnnotatedBindingBuilder[T]
    Attributes
    protected
    Definition Classes
    TwitterModule
  10. def bind[T](annotation: Annotation)(implicit arg0: Manifest[T]): ScalaAnnotatedBindingBuilder[T]
    Attributes
    protected
    Definition Classes
    TwitterModule
  11. def bind[T](implicit arg0: Manifest[T]): ScalaAnnotatedBindingBuilder[T]
    Attributes
    protected
    Definition Classes
    TwitterModule
  12. def bind[T](arg0: Class[T]): AnnotatedBindingBuilder[T]
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  13. def bind[T](arg0: TypeLiteral[T]): AnnotatedBindingBuilder[T]
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  14. def bind[T](arg0: Key[T]): LinkedBindingBuilder[T]
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  15. def bindAssistedFactory[T]()(implicit arg0: Manifest[T]): Unit
    Attributes
    protected
    Definition Classes
    TwitterModule
  16. def bindConstant(): AnnotatedConstantBindingBuilder
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  17. def bindInterceptor(arg0: Matcher[_ >: Class[_]], arg1: Matcher[_ >: Method], arg2: <repeated...>[MethodInterceptor]): Unit
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
    Annotations
    @transient()
  18. def bindListener(arg0: Matcher[_ >: Binding[_]], arg1: <repeated...>[ProvisionListener]): Unit
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
    Annotations
    @transient()
  19. def bindListener(arg0: Matcher[_ >: TypeLiteral[_]], arg1: TypeListener): Unit
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  20. def bindScope(arg0: Class[_ <: Annotation], arg1: Scope): Unit
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  21. def bindSingleton[T, A <: Annotation](implicit arg0: Manifest[T], arg1: Manifest[A]): ScalaAnnotatedBindingBuilder[T]
    Attributes
    protected
    Definition Classes
    TwitterModule
  22. def bindSingleton[T](annotation: Annotation)(implicit arg0: Manifest[T]): ScalaAnnotatedBindingBuilder[T]
    Attributes
    protected
    Definition Classes
    TwitterModule
  23. def bindSingleton[T](implicit arg0: Manifest[T]): ScalaAnnotatedBindingBuilder[T]
    Attributes
    protected
    Definition Classes
    TwitterModule
  24. def binder(): Binder
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  25. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  26. def closeOnExit(f: ⇒ Unit): Unit
    Attributes
    protected
    Definition Classes
    TwitterModuleLifecycle
  27. def configure(): Unit
    Attributes
    protected
    Definition Classes
    TwitterModule → AbstractModule
  28. final def configure(arg0: Binder): Unit
    Definition Classes
    AbstractModule → Module
  29. 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
    ThriftClientModule → ThriftClientModuleTrait
  30. def convertToTypes(arg0: Matcher[_ >: TypeLiteral[_]], arg1: TypeConverter): Unit
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  31. def createFlag[T](name: String, default: T, help: String, flaggable: Flaggable[T]): Flag[T]
    Attributes
    protected
    Definition Classes
    TwitterModuleFlags
  32. def createKey[T](implicit arg0: Manifest[T]): Key[T]
    Attributes
    protected
    Definition Classes
    TwitterBaseModule
  33. def createMandatoryFlag[T](name: String, help: String, usage: String, flaggable: Flaggable[T]): Flag[T]
    Definition Classes
    TwitterModuleFlags
  34. def createMultiBinder[MultiBindType](implicit arg0: Manifest[MultiBindType]): ScalaMultibinder[MultiBindType]
    Attributes
    protected
    Definition Classes
    TwitterModule
  35. def currentStage(): Stage
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  36. def debug(marker: Marker, message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  37. def debug(message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  38. def debug(marker: Marker, message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  39. def debug(message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  40. def debugFutureResult[T](msg: String)(func: ⇒ Future[T]): Future[T]
    Attributes
    protected
    Definition Classes
    Logging
  41. def debugResult[T](message: ⇒ String)(fn: ⇒ T): T
    Attributes
    protected[this]
    Definition Classes
    Logging
  42. def defaultClosableAwaitPeriod: Duration

    Default amount of time to block in Duration) on a Closable to close that is registered in a closeOnExit block.

    Default amount of time to block in Duration) on a Closable to close that is registered in a closeOnExit block.

    returns

    a com.twitter.util.Duration

    Attributes
    protected
    Definition Classes
    ThriftClientModuleTrait
    See also

    Duration)

  43. def defaultClosableGracePeriod: Duration

    Default amount of time to wait for any Closable being registered in a closeOnExit block.

    Default amount of time to wait for any Closable being registered in a closeOnExit block. Note that this timeout is advisory, as it attempts to give the close function some leeway, for example to drain clients or finish up other tasks.

    returns

    a com.twitter.util.Duration

    Attributes
    protected
    Definition Classes
    ThriftClientModuleTrait
    See also

    Duration)

  44. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  45. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  46. def error(marker: Marker, message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  47. def error(marker: Marker, message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  48. def error(message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  49. def error(message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  50. def errorResult[T](message: ⇒ String)(fn: ⇒ T): T
    Attributes
    protected[this]
    Definition Classes
    Logging
  51. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  52. def flag[T](name: String, help: String)(implicit arg0: Flaggable[T], arg1: Manifest[T]): Flag[T]
    Attributes
    protected
    Definition Classes
    TwitterModuleFlags
  53. def flag[T](name: String, default: T, help: String)(implicit arg0: Flaggable[T]): Flag[T]
    Attributes
    protected
    Definition Classes
    TwitterModuleFlags
  54. val flags: ArrayBuffer[Flag[_]]
    Attributes
    protected[com.twitter.inject]
    Definition Classes
    TwitterModuleFlags
  55. def frameworkModules: Seq[Module]
    Attributes
    protected[com.twitter.inject]
    Definition Classes
    TwitterBaseModule
  56. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  57. def getMembersInjector[T](arg0: TypeLiteral[T]): MembersInjector[T]
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  58. def getMembersInjector[T](arg0: Class[T]): MembersInjector[T]
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  59. def getProvider[T](implicit arg0: Manifest[T]): Provider[T]
    Attributes
    protected
    Definition Classes
    TwitterModule
  60. def getProvider[T](arg0: Class[T]): Provider[T]
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  61. def getProvider[T](arg0: Key[T]): Provider[T]
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  62. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  63. def info(marker: Marker, message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  64. def info(message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  65. def info(marker: Marker, message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  66. def info(message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  67. def infoResult[T](message: ⇒ String)(fn: ⇒ T): T
    Attributes
    protected[this]
    Definition Classes
    Logging
  68. def install(module: Module): Unit
    Attributes
    protected
    Definition Classes
    TwitterModule → AbstractModule
  69. def isDebugEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  70. def isDebugEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  71. def isErrorEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  72. def isErrorEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  73. def isInfoEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  74. def isInfoEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  75. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  76. def isTraceEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  77. def isTraceEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  78. def isWarnEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  79. def isWarnEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  80. def logger: Logger
    Attributes
    protected[this]
    Definition Classes
    Logging
  81. def loggerName: String
    Attributes
    protected
    Definition Classes
    Logging
  82. def modules: Seq[Module]
    Attributes
    protected[com.twitter.inject]
    Definition Classes
    TwitterBaseModule
  83. def monitor: Monitor

    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
    ThriftClientModule → ThriftClientModuleTrait
  84. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  85. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  86. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  87. final def providesThriftClient(injector: Injector, clientId: ClientId, statsReceiver: StatsReceiver): ThriftService
    Annotations
    @Singleton() @Provides()
  88. def requestInjection(arg0: Any): Unit
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  89. def requestStaticInjection(arg0: <repeated...>[Class[_]]): Unit
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
    Annotations
    @transient()
  90. def requestTimeout: Duration

    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
    ThriftClientModule → ThriftClientModuleTrait
    See also

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

    com.twitter.finagle.param.CommonParams.withRequestTimeout

  91. def requireBinding(arg0: Class[_]): Unit
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  92. def requireBinding(arg0: Key[_]): Unit
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  93. def retryBudget: RetryBudget

    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
    ThriftClientModule → ThriftClientModuleTrait
    See also

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

  94. def sessionAcquisitionTimeout: Duration

    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
    ThriftClientModule → ThriftClientModuleTrait
    See also

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

    com.twitter.finagle.param.ClientSessionParams.acquisitionTimeout

  95. def singletonPostWarmupComplete(injector: Injector): Unit
    Attributes
    protected[com.twitter.inject]
    Definition Classes
    TwitterModuleLifecycle
  96. def singletonShutdown(injector: Injector): Unit
    Attributes
    protected[com.twitter.inject]
    Definition Classes
    TwitterModuleLifecycle
  97. def singletonStartup(injector: Injector): Unit
    Attributes
    protected[com.twitter.inject]
    Definition Classes
    TwitterModuleLifecycle
  98. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  99. def time[T](formatStr: String)(func: ⇒ T): T
    Attributes
    protected
    Definition Classes
    Logging
  100. def toString(): String
    Definition Classes
    AnyRef → Any
  101. def trace(marker: Marker, message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  102. def trace(message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  103. def trace(marker: Marker, message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  104. def trace(message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  105. def traceResult[T](message: ⇒ String)(fn: ⇒ T): T
    Attributes
    protected[this]
    Definition Classes
    Logging
  106. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  107. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  108. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  109. def warn(marker: Marker, message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  110. def warn(message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  111. def warn(marker: Marker, message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  112. def warn(message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  113. def warnResult[T](message: ⇒ String)(fn: ⇒ T): T
    Attributes
    protected[this]
    Definition Classes
    Logging

Inherited from ThriftClientModuleTrait

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