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
- Alphabetic
- By Inheritance
- ThriftMethodBuilderClientModule
- ThriftClientModuleTrait
- TwitterModule
- TwitterBaseModule
- TwitterModuleLifecycle
- Logging
- Logging
- TwitterModuleFlags
- AbstractModule
- Module
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new ThriftMethodBuilderClientModule()(implicit servicePerEndpointBuilder: ServicePerEndpointBuilder[ServicePerEndpoint], methodPerEndpointBuilder: MethodPerEndpointBuilder[ServicePerEndpoint, MethodPerEndpoint])
Abstract Value Members
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
addError(arg0: Message): Unit
- Attributes
- protected[com.google.inject]
- Definition Classes
- AbstractModule
-
def
addError(arg0: Throwable): Unit
- Attributes
- protected[com.google.inject]
- Definition Classes
- AbstractModule
-
def
addError(arg0: String, arg1: <repeated...>[AnyRef]): Unit
- Attributes
- protected[com.google.inject]
- Definition Classes
- AbstractModule
- Annotations
- @transient()
-
def
addTypeConverter[T](converter: TypeConverter)(implicit arg0: Manifest[T]): Unit
- Attributes
- protected
- Definition Classes
- TwitterModule
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
bind[T, A <: Annotation](implicit arg0: Manifest[T], arg1: Manifest[A]): ScalaAnnotatedBindingBuilder[T]
- Attributes
- protected
- Definition Classes
- TwitterModule
-
def
bind[T](annotation: Annotation)(implicit arg0: Manifest[T]): ScalaAnnotatedBindingBuilder[T]
- Attributes
- protected
- Definition Classes
- TwitterModule
-
def
bind[T](implicit arg0: Manifest[T]): ScalaAnnotatedBindingBuilder[T]
- Attributes
- protected
- Definition Classes
- TwitterModule
-
def
bind[T](arg0: Class[T]): AnnotatedBindingBuilder[T]
- Attributes
- protected[com.google.inject]
- Definition Classes
- AbstractModule
-
def
bind[T](arg0: TypeLiteral[T]): AnnotatedBindingBuilder[T]
- Attributes
- protected[com.google.inject]
- Definition Classes
- AbstractModule
-
def
bind[T](arg0: Key[T]): LinkedBindingBuilder[T]
- Attributes
- protected[com.google.inject]
- Definition Classes
- AbstractModule
-
def
bindAssistedFactory[T]()(implicit arg0: Manifest[T]): Unit
- Attributes
- protected
- Definition Classes
- TwitterModule
-
def
bindConstant(): AnnotatedConstantBindingBuilder
- Attributes
- protected[com.google.inject]
- Definition Classes
- AbstractModule
-
def
bindInterceptor(arg0: Matcher[_ >: Class[_]], arg1: Matcher[_ >: Method], arg2: <repeated...>[MethodInterceptor]): Unit
- Attributes
- protected[com.google.inject]
- Definition Classes
- AbstractModule
- Annotations
- @transient()
-
def
bindListener(arg0: Matcher[_ >: Binding[_]], arg1: <repeated...>[ProvisionListener]): Unit
- Attributes
- protected[com.google.inject]
- Definition Classes
- AbstractModule
- Annotations
- @transient()
-
def
bindListener(arg0: Matcher[_ >: TypeLiteral[_]], arg1: TypeListener): Unit
- Attributes
- protected[com.google.inject]
- Definition Classes
- AbstractModule
-
def
bindScope(arg0: Class[_ <: Annotation], arg1: Scope): Unit
- Attributes
- protected[com.google.inject]
- Definition Classes
- AbstractModule
-
def
bindSingleton[T, A <: Annotation](implicit arg0: Manifest[T], arg1: Manifest[A]): ScalaAnnotatedBindingBuilder[T]
- Attributes
- protected
- Definition Classes
- TwitterModule
-
def
bindSingleton[T](annotation: Annotation)(implicit arg0: Manifest[T]): ScalaAnnotatedBindingBuilder[T]
- Attributes
- protected
- Definition Classes
- TwitterModule
-
def
bindSingleton[T](implicit arg0: Manifest[T]): ScalaAnnotatedBindingBuilder[T]
- Attributes
- protected
- Definition Classes
- TwitterModule
-
def
binder(): Binder
- Attributes
- protected[com.google.inject]
- Definition Classes
- AbstractModule
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
closeOnExit(f: ⇒ Unit): Unit
- Attributes
- protected
- Definition Classes
- TwitterModuleLifecycle
-
def
configure(): Unit
- Attributes
- protected
- Definition Classes
- TwitterModule → AbstractModule
-
final
def
configure(arg0: Binder): Unit
- Definition Classes
- AbstractModule → Module
-
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
-
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
configureServicePerEndpointwhich specifies configuration of aServicePerEndpointinterface 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
-
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
- ThriftMethodBuilderClientModule → ThriftClientModuleTrait
-
def
convertToTypes(arg0: Matcher[_ >: TypeLiteral[_]], arg1: TypeConverter): Unit
- Attributes
- protected[com.google.inject]
- Definition Classes
- AbstractModule
-
def
createFlag[T](name: String, default: T, help: String, flaggable: Flaggable[T]): Flag[T]
- Attributes
- protected
- Definition Classes
- TwitterModuleFlags
-
def
createKey[T](implicit arg0: Manifest[T]): Key[T]
- Attributes
- protected
- Definition Classes
- TwitterBaseModule
-
def
createMandatoryFlag[T](name: String, help: String, usage: String, flaggable: Flaggable[T]): Flag[T]
- Definition Classes
- TwitterModuleFlags
-
def
createMultiBinder[MultiBindType](implicit arg0: Manifest[MultiBindType]): ScalaMultibinder[MultiBindType]
- Attributes
- protected
- Definition Classes
- TwitterModule
-
def
currentStage(): Stage
- Attributes
- protected[com.google.inject]
- Definition Classes
- AbstractModule
-
def
debug(marker: Marker, message: ⇒ Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
debug(message: ⇒ Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
debug(marker: Marker, message: ⇒ Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
debug(message: ⇒ Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
debugFutureResult[T](msg: String)(func: ⇒ Future[T]): Future[T]
- Attributes
- protected
- Definition Classes
- Logging
-
def
debugResult[T](message: ⇒ String)(fn: ⇒ T): T
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
defaultClosableAwaitPeriod: Duration
Default amount of time to block in Duration) on a Closable to close that is registered in a
closeOnExitblock.Default amount of time to block in Duration) on a Closable to close that is registered in a
closeOnExitblock.- returns
a com.twitter.util.Duration
- Attributes
- protected
- Definition Classes
- ThriftClientModuleTrait
- See also
Duration)
-
def
defaultClosableGracePeriod: Duration
Default amount of time to wait for any Closable being registered in a
closeOnExitblock.Default amount of time to wait for any Closable being registered in a
closeOnExitblock. 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)
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
error(marker: Marker, message: ⇒ Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
error(marker: Marker, message: ⇒ Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
error(message: ⇒ Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
error(message: ⇒ Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
errorResult[T](message: ⇒ String)(fn: ⇒ T): T
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
flag[T](name: String, help: String)(implicit arg0: Flaggable[T], arg1: Manifest[T]): Flag[T]
- Attributes
- protected
- Definition Classes
- TwitterModuleFlags
-
def
flag[T](name: String, default: T, help: String)(implicit arg0: Flaggable[T]): Flag[T]
- Attributes
- protected
- Definition Classes
- TwitterModuleFlags
-
val
flags: ArrayBuffer[Flag[_]]
- Attributes
- protected[com.twitter.inject]
- Definition Classes
- TwitterModuleFlags
-
def
frameworkModules: Seq[Module]
- Attributes
- protected[com.twitter.inject]
- Definition Classes
- TwitterBaseModule
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getMembersInjector[T](arg0: TypeLiteral[T]): MembersInjector[T]
- Attributes
- protected[com.google.inject]
- Definition Classes
- AbstractModule
-
def
getMembersInjector[T](arg0: Class[T]): MembersInjector[T]
- Attributes
- protected[com.google.inject]
- Definition Classes
- AbstractModule
-
def
getProvider[T](implicit arg0: Manifest[T]): Provider[T]
- Attributes
- protected
- Definition Classes
- TwitterModule
-
def
getProvider[T](arg0: Class[T]): Provider[T]
- Attributes
- protected[com.google.inject]
- Definition Classes
- AbstractModule
-
def
getProvider[T](arg0: Key[T]): Provider[T]
- Attributes
- protected[com.google.inject]
- Definition Classes
- AbstractModule
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
info(marker: Marker, message: ⇒ Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
info(message: ⇒ Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
info(marker: Marker, message: ⇒ Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
info(message: ⇒ Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
infoResult[T](message: ⇒ String)(fn: ⇒ T): T
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
install(module: Module): Unit
- Attributes
- protected
- Definition Classes
- TwitterModule → AbstractModule
-
def
isDebugEnabled(marker: Marker): Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
isDebugEnabled: Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
isErrorEnabled(marker: Marker): Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
isErrorEnabled: Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
isInfoEnabled(marker: Marker): Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
isInfoEnabled: Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isTraceEnabled(marker: Marker): Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
isTraceEnabled: Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
isWarnEnabled(marker: Marker): Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
isWarnEnabled: Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
logger: Logger
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
loggerName: String
- Attributes
- protected
- Definition Classes
- Logging
-
def
modules: Seq[Module]
- Attributes
- protected[com.twitter.inject]
- Definition Classes
- TwitterBaseModule
-
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
- ThriftMethodBuilderClientModule → ThriftClientModuleTrait
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
providesMethodPerEndpoint(servicePerEndpoint: ServicePerEndpoint): MethodPerEndpoint
- Annotations
- @Provides() @Singleton()
-
final
def
providesServicePerEndpoint(injector: Injector, clientId: ClientId, statsReceiver: StatsReceiver): ServicePerEndpoint
- Annotations
- @Provides() @Singleton()
-
def
requestInjection(arg0: Any): Unit
- Attributes
- protected[com.google.inject]
- Definition Classes
- AbstractModule
-
def
requestStaticInjection(arg0: <repeated...>[Class[_]]): Unit
- Attributes
- protected[com.google.inject]
- Definition Classes
- AbstractModule
- Annotations
- @transient()
-
def
requestTimeout: Duration
Configures a "global" request
timeouton the ThriftMux client (default: unbounded).Configures a "global" request
timeouton 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
-
def
requireBinding(arg0: Class[_]): Unit
- Attributes
- protected[com.google.inject]
- Definition Classes
- AbstractModule
-
def
requireBinding(arg0: Key[_]): Unit
- Attributes
- protected[com.google.inject]
- Definition Classes
- AbstractModule
-
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
- ThriftMethodBuilderClientModule → ThriftClientModuleTrait
- See also
https://twitter.github.io/finagle/guide/Clients.html#retries
-
def
sessionAcquisitionTimeout: Duration
Configures the session acquisition
timeoutof this client (default: unbounded).Configures the session acquisition
timeoutof 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
-
def
singletonPostWarmupComplete(injector: Injector): Unit
- Attributes
- protected[com.twitter.inject]
- Definition Classes
- TwitterModuleLifecycle
-
def
singletonShutdown(injector: Injector): Unit
- Attributes
- protected[com.twitter.inject]
- Definition Classes
- TwitterModuleLifecycle
-
def
singletonStartup(injector: Injector): Unit
- Attributes
- protected[com.twitter.inject]
- Definition Classes
- TwitterModuleLifecycle
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
time[T](formatStr: String)(func: ⇒ T): T
- Attributes
- protected
- Definition Classes
- Logging
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
trace(marker: Marker, message: ⇒ Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
trace(message: ⇒ Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
trace(marker: Marker, message: ⇒ Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
trace(message: ⇒ Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
traceResult[T](message: ⇒ String)(fn: ⇒ T): T
- Attributes
- protected[this]
- Definition Classes
- Logging
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
warn(marker: Marker, message: ⇒ Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
warn(message: ⇒ Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
warn(marker: Marker, message: ⇒ Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
warn(message: ⇒ Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
-
def
warnResult[T](message: ⇒ String)(fn: ⇒ T): T
- Attributes
- protected[this]
- Definition Classes
- Logging