Override to supply a custom ClientId, e.g., override protected def clientId(injector: Injector): ClientId = ClientId("myclient") }}}
Override to supply a custom ClientId, e.g., override protected def clientId(injector: Injector): ClientId = ClientId("myclient") }}}
The default requires a ClientId be bound to the injector, for example via a ThriftClientIdModule.
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) }
the com.twitter.inject.Injector which can be used to help configure the given com.twitter.finagle.ThriftMux.Client.
the com.twitter.finagle.ThriftMux.Client to configure.
a configured ThriftMux.Client.
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 aMethodPerEndpoint
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.A Scrooge-generated
MethodPerEndpoint
or the higher-kinded type of the Scrooge-generated service, e.g.,MyService[Future]
.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.
What is ThriftMux?
Finagle Clients
String, label: String)