Packages

  • package root
    Definition Classes
    root
  • package com
    Definition Classes
    root
  • package twitter
    Definition Classes
    com
  • package finagle
    Definition Classes
    twitter
  • object Thrift extends Client[ThriftClientRequest, Array[Byte]] with Server[Array[Byte], Array[Byte]]

    Client and server for Apache Thrift.

    Client and server for Apache Thrift. Thrift implements Thrift framed transport and binary protocol by default, though custom protocol factories (i.e. wire encoding) may be injected with withProtocolFactory. The client, Client[ThriftClientRequest, Array[Byte]] provides direct access to the thrift transport, but we recommend using code generation through either Scrooge or a fork of the Apache generator. A rich API is provided to support interfaces generated with either of these code generators.

    The client and server uses the standard thrift protocols, with support for both framed and buffered transports. Finagle attempts to upgrade the protocol in order to ship an extra envelope carrying additional request metadata, containing, among other things, request IDs for Finagle's RPC tracing facilities.

    The negotiation is simple: on connection establishment, an improbably-named method is dispatched on the server. If that method isn't found, we are dealing with a legacy thrift server, and the standard protocol is used. If the remote server is also a finagle server (or any other supporting this extension), we reply to the request, and every subsequent request is dispatched with an envelope carrying trace metadata. The envelope itself is also a Thrift struct described here.

    Clients

    Clients can be created directly from an interface generated from a Thrift IDL:

    For example, this IDL:

    service TestService {
      string query(1: string x)
    }

    compiled with Scrooge, generates the interface TestService.MethodPerEndpoint. This is then passed into Thrift.Client.build:

    Thrift.client.build[TestService.MethodPerEndpoint](
      addr, classOf[TestService.MethodPerEndpoint])

    However note that the Scala compiler can insert the latter Class for us, for which another variant of build is provided:

    Thrift.client.build[TestService.MethodPerEndpoint](addr)

    In Java, we need to provide the class object:

    TestService.MethodPerEndpoint client =
      Thrift.client.build(addr, TestService.MethodPerEndpoint.class);

    The client uses the standard thrift protocols, with support for both framed and buffered transports. Finagle attempts to upgrade the protocol in order to ship an extra envelope carrying trace IDs and client IDs associated with the request. These are used by Finagle's tracing facilities and may be collected via aggregators like Zipkin.

    The negotiation is simple: on connection establishment, an improbably-named method is dispatched on the server. If that method isn't found, we are dealing with a legacy thrift server, and the standard protocol is used. If the remote server is also a finagle server (or any other supporting this extension), we reply to the request, and every subsequent request is dispatched with an envelope carrying trace metadata. The envelope itself is also a Thrift struct described here.

    Servers

    TestService.MethodPerEndpoint must be implemented and passed into serveIface:

    // An echo service
    ThriftMux.server.serveIface(":*", new TestService.MethodPerEndpoint {
      def query(x: String): Future[String] = Future.value(x)
    })
    Definition Classes
    finagle
  • Client
  • Server
  • param

case class Client(stack: Stack[ServiceFactory[ThriftClientRequest, Array[Byte]]] = Client.stack, params: Params = Client.params) extends StdStackClient[ThriftClientRequest, Array[Byte], Client] with WithSessionPool[Client] with WithDefaultLoadBalancer[Client] with WithThriftPartitioningStrategy[Client] with ThriftRichClient with Product with Serializable

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Client
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. ThriftRichClient
  7. WithThriftPartitioningStrategy
  8. WithDefaultLoadBalancer
  9. WithSessionPool
  10. StdStackClient
  11. EndpointerStackClient
  12. WithSessionQualifier
  13. WithClientSession
  14. WithClientTransport
  15. WithClientAdmissionControl
  16. ClientParams
  17. CommonParams
  18. StackClient
  19. StackBasedClient
  20. Transformable
  21. Parameterized
  22. Client
  23. AnyRef
  24. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Client(stack: Stack[ServiceFactory[ThriftClientRequest, Array[Byte]]] = Client.stack, params: Params = Client.params)

Type Members

  1. type Context = TransportContext
    Attributes
    protected
    Definition Classes
    Client → StdStackClient
  2. type In = ThriftClientRequest
    Attributes
    protected
    Definition Classes
    Client → StdStackClient
  3. type Out = Array[Byte]
    Attributes
    protected
    Definition Classes
    Client → StdStackClient
  4. class MultiplexedThriftClient extends AnyRef
    Definition Classes
    ThriftRichClient

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def build[ThriftServiceType](name: Name, label: String, cls: Class[_], clientParam: RichClientParam, service: Service[ThriftClientRequest, Array[Byte]]): ThriftServiceType

    Create a new client of type ThriftServiceType, which must be generated by Scrooge.

    Create a new client of type ThriftServiceType, which must be generated by Scrooge.

    For Scala generated code, the Class passed in should be either ServiceName$MethodPerEndpoint or ServiceName[Future].

    For Java generated code, the Class passed in should be ServiceName$ServiceIface.

    Definition Classes
    ThriftRichClient
  6. def build[ThriftServiceType](name: Name, label: String, cls: Class[_]): ThriftServiceType

    Create a new client of type ThriftServiceType, which must be generated by Scrooge.

    Create a new client of type ThriftServiceType, which must be generated by Scrooge.

    For Scala generated code, the Class passed in should be either ServiceName$MethodPerEndpoint or ServiceName[Future].

    For Java generated code, the Class passed in should be ServiceName$ServiceIface.

    Definition Classes
    ThriftRichClient
  7. def build[ThriftServiceType](dest: Name, label: String)(implicit arg0: ClassTag[ThriftServiceType]): ThriftServiceType

    Create a new client of type ThriftServiceType, which must be generated by Scrooge.

    Create a new client of type ThriftServiceType, which must be generated by Scrooge.

    For Scala generated code, the Class passed in should be either ServiceName$MethodPerEndpoint or ServiceName[Future].

    For Java generated code, the Class passed in should be ServiceName$ServiceIface.

    Definition Classes
    ThriftRichClient
  8. def build[ThriftServiceType](dest: String, label: String)(implicit arg0: ClassTag[ThriftServiceType]): ThriftServiceType

    Create a new client of type ThriftServiceType, which must be generated by Scrooge.

    Create a new client of type ThriftServiceType, which must be generated by Scrooge.

    For Scala generated code, the Class passed in should be either ServiceName$MethodPerEndpoint or ServiceName[Future].

    For Java generated code, the Class passed in should be ServiceName$ServiceIface.

    Definition Classes
    ThriftRichClient
  9. def build[ThriftServiceType](dest: String)(implicit arg0: ClassTag[ThriftServiceType]): ThriftServiceType

    Create a new client of type ThriftServiceType, which must be generated by Scrooge.

    Create a new client of type ThriftServiceType, which must be generated by Scrooge.

    For Scala generated code, the Class passed in should be either ServiceName$MethodPerEndpoint or ServiceName[Future].

    For Java generated code, the Class passed in should be ServiceName$ServiceIface.

    Definition Classes
    ThriftRichClient
  10. def build[ThriftServiceType](dest: String, label: String, cls: Class[_]): ThriftServiceType

    Create a new client of type ThriftServiceType, which must be generated by Scrooge.

    Create a new client of type ThriftServiceType, which must be generated by Scrooge.

    For Scala generated code, the Class passed in should be either ServiceName$MethodPerEndpoint or ServiceName[Future].

    For Java generated code, the Class passed in should be ServiceName$ServiceIface.

    Definition Classes
    ThriftRichClient
  11. def build[ThriftServiceType](dest: String, cls: Class[_]): ThriftServiceType

    Create a new client of type ThriftServiceType, which must be generated by Scrooge.

    Create a new client of type ThriftServiceType, which must be generated by Scrooge.

    For Scala generated code, the Class passed in should be either ServiceName$MethodPerEndpoint or ServiceName[Future].

    For Java generated code, the Class passed in should be ServiceName$ServiceIface.

    Definition Classes
    ThriftRichClient
  12. def clientId: Option[ClientId]
  13. val clientParam: RichClientParam
    Attributes
    protected
    Definition Classes
    ClientThriftRichClient
  14. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  15. def configured[P](psp: (P, Param[P])): Client
    Definition Classes
    Client → EndpointerStackClient → StackClient → Parameterized
  16. def configured[P](p: P)(implicit arg0: Param[P]): Client
    Definition Classes
    EndpointerStackClient → StackClient → Parameterized
  17. def configuredParams(newParams: Params): Client
    Definition Classes
    EndpointerStackClient → StackClient → Parameterized
  18. def copy1(stack: Stack[ServiceFactory[ThriftClientRequest, Array[Byte]]] = this.stack, params: Params = this.params): Client
    Attributes
    protected
    Definition Classes
    Client → StdStackClient → EndpointerStackClient
  19. lazy val defaultClientName: String

    The client name used when group isn't named.

    The client name used when group isn't named.

    Attributes
    protected
    Definition Classes
    ClientThriftRichClient
  20. final def endpointer: Stackable[ServiceFactory[ThriftClientRequest, Array[Byte]]]
    Attributes
    protected
    Definition Classes
    StdStackClient → EndpointerStackClient
  21. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. def filtered(filter: Filter[ThriftClientRequest, Array[Byte], ThriftClientRequest, Array[Byte]]): Client
    Definition Classes
    Client → EndpointerStackClient
  23. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  24. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  25. def injectors: Seq[ClientParamsInjector]
    Attributes
    protected
    Definition Classes
    EndpointerStackClient
  26. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  27. def multiplex[T](dest: String, label: String)(build: (MultiplexedThriftClient) ⇒ T): T

    Build client interfaces for multiplexed thrift services.

    Build client interfaces for multiplexed thrift services.

    E.g.

    val client = Thrift.client.multiplex(address, "client") { client =>
      new {
        val echo = client.newIface[Echo.MethodPerEndpoint]("echo")
        val extendedEcho = client.newServiceIface[ExtendedEcho.ServiceIface]("extendedEcho")
      }
    }
    
    client.echo.echo("hello")
    client.extendedEcho.getStatus(ExtendedEcho.GetStatus.Args())
    Definition Classes
    ThriftRichClient
  28. def multiplex[T](dest: Name, label: String)(build: (MultiplexedThriftClient) ⇒ T): T

    Build client interfaces for multiplexed thrift services.

    Build client interfaces for multiplexed thrift services.

    E.g.

    val client = Thrift.client.multiplex(address, "client") { client =>
      new {
        val echo = client.newIface[Echo.MethodPerEndpoint]("echo")
        val extendedEcho = client.newServiceIface[ExtendedEcho.ServiceIface]("extendedEcho")
      }
    }
    
    client.echo.echo("hello")
    client.extendedEcho.getStatus(ExtendedEcho.GetStatus.Args())
    Definition Classes
    ThriftRichClient
  29. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  30. def newClient(dest: Name, label: String): ServiceFactory[ThriftClientRequest, Array[Byte]]
    Definition Classes
    Client → EndpointerStackClient → Client
  31. final def newClient(dest: String, label: String): ServiceFactory[ThriftClientRequest, Array[Byte]]
    Definition Classes
    Client
  32. final def newClient(dest: String): ServiceFactory[ThriftClientRequest, Array[Byte]]
    Definition Classes
    Client
  33. def newDispatcher(transport: Transport[ThriftClientRequest, Array[Byte]] { type Context <: Client.this.Context }): Service[ThriftClientRequest, Array[Byte]]
    Attributes
    protected
    Definition Classes
    Client → StdStackClient
  34. def newService(dest: Name, label: String): Service[ThriftClientRequest, Array[Byte]]
    Definition Classes
    EndpointerStackClient → Client
  35. final def newService(dest: String, label: String): Service[ThriftClientRequest, Array[Byte]]
    Definition Classes
    Client
  36. final def newService(dest: String): Service[ThriftClientRequest, Array[Byte]]
    Definition Classes
    Client
  37. def newServicePerEndpoint[ServicePerEndpoint <: Filterable[ServicePerEndpoint]](service: Service[ThriftClientRequest, Array[Byte]], label: String)(implicit builder: ServicePerEndpointBuilder[ServicePerEndpoint]): ServicePerEndpoint

    Construct a Finagle Service interface for a Scrooge-generated Thrift object.

    Construct a Finagle Service interface for a Scrooge-generated Thrift object.

    E.g. given a Thrift service

    service Logger {
      string log(1: string message, 2: i32 logLevel);
      i32 getLogSize();
    }

    you can construct a client interface with a Finagle Service per Thrift method:

    val loggerService: Logger.ServicePerEndpoint = Thrift.client.servicePerEndpoint[Logger.ServicePerEndpoint]("localhost:8000", "client_label")
    val response: String = loggerService.log(Logger.Log.Args("log message", 1))

    You can also create a Finagle Service[scrooge.Request, scrooge.Response] per-endpoint (method) for a Scrooge-generated Thrift object.

    E.g. given a Thrift service

    service Logger {
      string log(1: string message, 2: i32 logLevel);
      i32 getLogSize();
    }

    you can construct a client interface with a Finagle Service per Thrift method that uses the Scrooge Request/Response envelopes:

    val loggerService: Logger.ReqRepServicePerEndpoint = Thrift.client.servicePerEndpoint[Logger.ReqRepServicePerEndpoint]("localhost:8000", "client_label")
    val response: c.t.scrooge.Response[String] = loggerService.log(c.t.scrooge.Request(Logger.Log.Args("log message", 1)))

    This allows you to access any contained c.t.scrooge.Request and c.t.scrooge.Response headers.

    service

    The Finagle Service to be used.

    label

    Assign a label for scoped stats.

    builder

    The builder type is generated by Scrooge for a thrift service.

    Attributes
    protected
    Definition Classes
    ThriftRichClient
  38. def newTransporter(addr: SocketAddress): Transporter[In, Out, Context]
    Attributes
    protected
    Definition Classes
    Client → StdStackClient
  39. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  40. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  41. val params: Params
    Definition Classes
    Client → StackClient → Parameterized
  42. final def registerTransporter(transporterName: String): Unit
    Attributes
    protected
    Definition Classes
    StackClient
  43. def servicePerEndpoint[ServicePerEndpoint <: Filterable[ServicePerEndpoint]](dest: Name, label: String)(implicit builder: ServicePerEndpointBuilder[ServicePerEndpoint]): ServicePerEndpoint

    Construct a Finagle Service interface for a Scrooge-generated Thrift object.

    Construct a Finagle Service interface for a Scrooge-generated Thrift object.

    E.g. given a Thrift service

    service Logger {
      string log(1: string message, 2: i32 logLevel);
      i32 getLogSize();
    }

    you can construct a client interface with a Finagle Service per Thrift method:

    val loggerService: Logger.ServicePerEndpoint = Thrift.client.servicePerEndpoint[Logger.ServicePerEndpoint]("localhost:8000", "client_label")
    val response: String = loggerService.log(Logger.Log.Args("log message", 1))

    You can also create a Finagle Service[scrooge.Request, scrooge.Response] per-endpoint (method) for a Scrooge-generated Thrift object.

    E.g. given a Thrift service

    service Logger {
      string log(1: string message, 2: i32 logLevel);
      i32 getLogSize();
    }

    you can construct a client interface with a Finagle Service per Thrift method that uses the Scrooge Request/Response envelopes:

    val loggerService: Logger.ReqRepServicePerEndpoint = Thrift.client.servicePerEndpoint[Logger.ReqRepServicePerEndpoint]("localhost:8000", "client_label")
    val response: c.t.scrooge.Response[String] = loggerService.log(c.t.scrooge.Request(Logger.Log.Args("log message", 1)))

    This allows you to access any contained c.t.scrooge.Request and c.t.scrooge.Response headers.

    dest

    Address of the service to connect to.

    label

    Assign a label for scoped stats.

    builder

    The builder type is generated by Scrooge for a thrift service.

    Definition Classes
    ThriftRichClient
  44. def servicePerEndpoint[ServicePerEndpoint <: Filterable[ServicePerEndpoint]](dest: String, label: String)(implicit builder: ServicePerEndpointBuilder[ServicePerEndpoint]): ServicePerEndpoint

    Construct a Finagle Service interface for a Scrooge-generated Thrift object.

    Construct a Finagle Service interface for a Scrooge-generated Thrift object.

    E.g. given a Thrift service

    service Logger {
      string log(1: string message, 2: i32 logLevel);
      i32 getLogSize();
    }

    you can construct a client interface with a Finagle Service per Thrift method:

    val loggerService: Logger.ServicePerEndpoint = Thrift.client.servicePerEndpoint[Logger.ServicePerEndpoint]("localhost:8000", "client_label")
    val response: String = loggerService.log(Logger.Log.Args("log message", 1))

    You can also create a Finagle Service[scrooge.Request, scrooge.Response] per-endpoint (method) for a Scrooge-generated Thrift object.

    E.g. given a Thrift service

    service Logger {
      string log(1: string message, 2: i32 logLevel);
      i32 getLogSize();
    }

    you can construct a client interface with a Finagle Service per Thrift method that uses the Scrooge Request/Response envelopes:

    val loggerService: Logger.ReqRepServicePerEndpoint = Thrift.client.servicePerEndpoint[Logger.ReqRepServicePerEndpoint]("localhost:8000", "client_label")
    val response: c.t.scrooge.Response[String] = loggerService.log(c.t.scrooge.Request(Logger.Log.Args("log message", 1)))

    This allows you to access any contained c.t.scrooge.Request and c.t.scrooge.Response headers.

    dest

    Address of the service to connect to, in the format accepted by Resolver.eval.

    label

    Assign a label for scoped stats.

    builder

    The builder type is generated by Scrooge for a thrift service.

    Definition Classes
    ThriftRichClient
  45. val stack: Stack[ServiceFactory[ThriftClientRequest, Array[Byte]]]
    Definition Classes
    Client → StackClient
  46. def stats: StatsReceiver
    Attributes
    protected
    Definition Classes
    ThriftRichClient
  47. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  48. def transformed(t: Transformer): StackClient[ThriftClientRequest, Array[Byte]]
    Definition Classes
    StackClient → Transformable
  49. def transformers: Seq[ClientStackTransformer]
    Attributes
    protected
    Definition Classes
    EndpointerStackClient
  50. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  53. val withAdmissionControl: ClientAdmissionControlParams[Client]
    Definition Classes
    Client → WithClientAdmissionControl
  54. def withAttemptTTwitterUpgrade: Client
  55. def withBufferedTransport: Client

    Use a buffered transport instead of the default framed transport.

    Use a buffered transport instead of the default framed transport. In almost all cases, the default framed transport should be used.

  56. def withClientId(clientId: ClientId): Client
  57. def withExceptionStatsHandler(exceptionStatsHandler: ExceptionStatsHandler): Client
    Definition Classes
    Client → CommonParams
  58. def withExecutionOffloaded(pool: FuturePool): Client
    Definition Classes
    Client → CommonParams
  59. def withExecutionOffloaded(executor: ExecutorService): Client
    Definition Classes
    Client → CommonParams
  60. def withLabel(label: String): Client
    Definition Classes
    Client → CommonParams
  61. def withLabels(keywords: String*): Client
    Definition Classes
    CommonParams
  62. val withLoadBalancer: DefaultLoadBalancingParams[Client]
    Definition Classes
    Client → WithDefaultLoadBalancer
  63. def withMaxReusableBufferSize(size: Int): Client

    Produce a com.twitter.finagle.Thrift.Client with the specified max size of the reusable buffer for thrift responses.

    Produce a com.twitter.finagle.Thrift.Client with the specified max size of the reusable buffer for thrift responses. If this size is exceeded, the buffer is not reused and a new buffer is allocated for the next thrift response. The default max size is 16Kb.

    size

    Max size of the reusable buffer for thrift responses in bytes.

    Note

    MaxReusableBufferSize will be ignored if TReusableBufferFactory is set.

  64. def withMonitor(monitor: Monitor): Client
    Definition Classes
    Client → CommonParams
  65. def withNoAttemptTTwitterUpgrade: Client
  66. def withParams(params: Params): Client
    Definition Classes
    EndpointerStackClient → StackClient → Parameterized
  67. val withPartitioning: PartitioningParams[Client]

    An entry point for configuring Thrift/ThriftMux client's partitioning service

    An entry point for configuring Thrift/ThriftMux client's partitioning service

    Definition Classes
    ClientWithThriftPartitioningStrategy
  68. def withPerEndpointStats: Client

    Produce a com.twitter.finagle.Thrift.Client with per-endpoint stats filters

  69. def withProtocolFactory(protocolFactory: TProtocolFactory): Client
  70. def withRequestTimeout(timeout: Duration): Client
    Definition Classes
    Client → CommonParams
  71. def withRequestTimeout(timeout: Tunable[Duration]): Client
    Definition Classes
    CommonParams
  72. def withResponseClassifier(responseClassifier: ResponseClassifier): Client
    Definition Classes
    Client → CommonParams
  73. def withRetryBackoff(backoff: Backoff): Client
    Definition Classes
    Client → ClientParams
  74. def withRetryBudget(budget: RetryBudget): Client
    Definition Classes
    Client → ClientParams
  75. val withSession: ClientSessionParams[Client]
    Definition Classes
    Client → WithClientSession
  76. val withSessionPool: SessionPoolingParams[Client]
    Definition Classes
    Client → WithSessionPool
  77. val withSessionQualifier: SessionQualificationParams[Client]
    Definition Classes
    Client → WithSessionQualifier
  78. def withStack(fn: (Stack[ServiceFactory[ThriftClientRequest, Array[Byte]]]) ⇒ Stack[ServiceFactory[ThriftClientRequest, Array[Byte]]]): Client
    Definition Classes
    Client → EndpointerStackClient → StackClient
  79. def withStack(stack: Stack[ServiceFactory[ThriftClientRequest, Array[Byte]]]): Client
    Definition Classes
    Client → EndpointerStackClient → StackClient
  80. def withStatsReceiver(statsReceiver: StatsReceiver): Client
    Definition Classes
    Client → CommonParams
  81. def withTReusableBufferFactory(tReusableBufferFactory: () ⇒ TReusableBuffer): Client

    Produce a com.twitter.finagle.Thrift.Client with a factory creates new TReusableBuffer, the TReusableBuffer can be shared with other client instance.

    Produce a com.twitter.finagle.Thrift.Client with a factory creates new TReusableBuffer, the TReusableBuffer can be shared with other client instance. If set, the MaxReusableBufferSize will be ignored.

  82. def withTracer(tracer: Tracer): Client
    Definition Classes
    Client → CommonParams
  83. val withTransport: ClientTransportParams[Client]
    Definition Classes
    Client → WithClientTransport

Deprecated Value Members

  1. def newIface[Iface](name: Name, label: String, cls: Class[_], protocolFactory: TProtocolFactory, service: Service[ThriftClientRequest, Array[Byte]]): Iface
    Definition Classes
    ThriftRichClient
    Annotations
    @deprecated
    Deprecated

    (Since version 2017-8-16) Use com.twitter.finagle.thrift.RichClientParam

  2. def newIface[Iface](name: Name, label: String, cls: Class[_], clientParam: RichClientParam, service: Service[ThriftClientRequest, Array[Byte]]): Iface

    Create a new client of type Iface, which must be generated by Scrooge.

    Create a new client of type Iface, which must be generated by Scrooge.

    For Scala generated code, the Class passed in should be either ServiceName$MethodPerEndpoint or ServiceName[Future].

    For Java generated code, the Class passed in should be ServiceName$ServiceIface.

    Definition Classes
    ThriftRichClient
    Annotations
    @deprecated
    Deprecated

    (Since version 2017-11-20) Use com.twitter.finagle.ThriftRichClient#build

  3. def newIface[Iface](name: Name, label: String, cls: Class[_]): Iface

    Create a new client of type Iface, which must be generated by Scrooge.

    Create a new client of type Iface, which must be generated by Scrooge.

    For Scala generated code, the Class passed in should be either ServiceName$MethodPerEndpoint or ServiceName[Future].

    For Java generated code, the Class passed in should be ServiceName$ServiceIface.

    Definition Classes
    ThriftRichClient
    Annotations
    @deprecated
    Deprecated

    (Since version 2017-11-20) Use com.twitter.finagle.ThriftRichClient#build

  4. def newIface[Iface](dest: Name, label: String)(implicit arg0: ClassTag[Iface]): Iface

    Create a new client of type Iface, which must be generated by Scrooge.

    Create a new client of type Iface, which must be generated by Scrooge.

    For Scala generated code, the Class passed in should be either ServiceName$MethodPerEndpoint or ServiceName[Future].

    For Java generated code, the Class passed in should be ServiceName$ServiceIface.

    Definition Classes
    ThriftRichClient
    Annotations
    @deprecated
    Deprecated

    (Since version 2017-11-20) Use com.twitter.finagle.ThriftRichClient#build

  5. def newIface[Iface](dest: String, label: String)(implicit arg0: ClassTag[Iface]): Iface

    Create a new client of type Iface, which must be generated by Scrooge.

    Create a new client of type Iface, which must be generated by Scrooge.

    For Scala generated code, the Class passed in should be either ServiceName$MethodPerEndpoint or ServiceName[Future].

    For Java generated code, the Class passed in should be ServiceName$ServiceIface.

    Definition Classes
    ThriftRichClient
    Annotations
    @deprecated
    Deprecated

    (Since version 2017-11-20) Use com.twitter.finagle.ThriftRichClient#build

  6. def newIface[Iface](dest: String)(implicit arg0: ClassTag[Iface]): Iface

    Create a new client of type Iface, which must be generated by Scrooge.

    Create a new client of type Iface, which must be generated by Scrooge.

    For Scala generated code, the Class passed in should be either ServiceName$MethodPerEndpoint or ServiceName[Future].

    For Java generated code, the Class passed in should be ServiceName$ServiceIface.

    Definition Classes
    ThriftRichClient
    Annotations
    @deprecated
    Deprecated

    (Since version 2017-11-20) Use com.twitter.finagle.ThriftRichClient#build

  7. def newIface[Iface](dest: String, label: String, cls: Class[_]): Iface

    Create a new client of type Iface, which must be generated by Scrooge.

    Create a new client of type Iface, which must be generated by Scrooge.

    For Scala generated code, the Class passed in should be either ServiceName$MethodPerEndpoint or ServiceName[Future].

    For Java generated code, the Class passed in should be ServiceName$ServiceIface.

    Definition Classes
    ThriftRichClient
    Annotations
    @deprecated
    Deprecated

    (Since version 2017-11-20) Use com.twitter.finagle.ThriftRichClient#build

  8. def newIface[Iface](dest: String, cls: Class[_]): Iface

    Create a new client of type Iface, which must be generated by Scrooge.

    Create a new client of type Iface, which must be generated by Scrooge.

    For Scala generated code, the Class passed in should be either ServiceName$MethodPerEndpoint or ServiceName[Future].

    For Java generated code, the Class passed in should be ServiceName$ServiceIface.

    Definition Classes
    ThriftRichClient
    Annotations
    @deprecated
    Deprecated

    (Since version 2017-11-20) Use com.twitter.finagle.ThriftRichClient#build

  9. def newServiceIface[ServiceIface <: Filterable[ServiceIface]](dest: Name, label: String)(implicit builder: ServiceIfaceBuilder[ServiceIface]): ServiceIface

    Construct a Finagle Service interface for a Scrooge-generated Thrift object.

    Construct a Finagle Service interface for a Scrooge-generated Thrift object.

    E.g. given a Thrift service

    service Logger {
      string log(1: string message, 2: i32 logLevel);
      i32 getLogSize();
    }

    you can construct a client interface with a Finagle Service per Thrift method:

    val loggerService: Logger.ServiceIface = Thrift.client.newServiceIface[Logger.ServiceIface]("localhost:8000", "client_label")
    val response: String = loggerService.log(Logger.Log.Args("log message", 1))
    dest

    Address of the service to connect to.

    label

    Assign a label for scoped stats.

    builder

    The builder type is generated by Scrooge for a thrift service.

    Definition Classes
    ThriftRichClient
    Annotations
    @deprecated
    Deprecated

    (Since version 2017-11-13) Use com.twitter.finagle.ThriftRichClient#servicePerEndpoint[ServicePerEndpoint]

  10. def newServiceIface[ServiceIface <: Filterable[ServiceIface]](dest: String, label: String)(implicit builder: ServiceIfaceBuilder[ServiceIface]): ServiceIface

    Construct a Finagle Service interface for a Scrooge-generated Thrift object.

    Construct a Finagle Service interface for a Scrooge-generated Thrift object.

    E.g. given a Thrift service

    service Logger {
      string log(1: string message, 2: i32 logLevel);
      i32 getLogSize();
    }

    you can construct a client interface with a Finagle Service per Thrift method:

    val loggerService: Logger.ServiceIface = Thrift.client.newServiceIface[Logger.ServiceIface]("localhost:8000", "client_label")
    val response: String = loggerService.log(Logger.Log.Args("log message", 1))
    dest

    Address of the service to connect to, in the format accepted by Resolver.eval.

    label

    Assign a label for scoped stats.

    builder

    The builder type is generated by Scrooge for a thrift service.

    Definition Classes
    ThriftRichClient
    Annotations
    @deprecated
    Deprecated

    (Since version 2017-11-13) Use com.twitter.finagle.ThriftRichClient#servicePerEndpoint[ServicePerEndpoint]

  11. def transformed(f: (Stack[ServiceFactory[ThriftClientRequest, Array[Byte]]]) ⇒ Stack[ServiceFactory[ThriftClientRequest, Array[Byte]]]): Client
    Definition Classes
    EndpointerStackClient
    Annotations
    @deprecated
    Deprecated

    (Since version 2018-10-30) Use withStack(Stack[ServiceFactory[Req, Rep]] => Stack[ServiceFactory[Req, Rep]]) instead

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from ThriftRichClient

Inherited from WithSessionPool[Client]

Inherited from WithSessionQualifier[Client]

Inherited from WithClientSession[Client]

Inherited from WithClientTransport[Client]

Inherited from ClientParams[Client]

Inherited from CommonParams[Client]

Inherited from Transformable[StackClient[ThriftClientRequest, Array[Byte]]]

Inherited from Parameterized[Client]

Inherited from AnyRef

Inherited from Any

Ungrouped