Class/Object

com.twitter.finagle.Thrift

Client

Related Docs: object Client | package Thrift

Permalink

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 ThriftRichClient with Product with Serializable

A ThriftMux com.twitter.finagle.Client.

See also

Mux documentation

Thrift documentation

Configuration documentation

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Client
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. ThriftRichClient
  7. WithDefaultLoadBalancer
  8. WithSessionPool
  9. StdStackClient
  10. EndpointerStackClient
  11. WithSessionQualifier
  12. WithClientSession
  13. WithClientTransport
  14. WithClientAdmissionControl
  15. ClientParams
  16. CommonParams
  17. StackClient
  18. StackBasedClient
  19. Transformable
  20. Parameterized
  21. Client
  22. AnyRef
  23. 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)

    Permalink

Type Members

  1. type Context = TransportContext

    Permalink
    Attributes
    protected
    Definition Classes
    Client → StdStackClient
  2. type In = ThriftClientRequest

    Permalink
    Attributes
    protected
    Definition Classes
    Client → StdStackClient
  3. class MultiplexedThriftClient extends AnyRef

    Permalink
    Definition Classes
    ThriftRichClient
  4. type Out = Array[Byte]

    Permalink
    Attributes
    protected
    Definition Classes
    Client → StdStackClient

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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def build[ThriftServiceType](name: Name, label: String, cls: Class[_], clientParam: RichClientParam, service: Service[ThriftClientRequest, Array[Byte]]): ThriftServiceType

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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]

    Permalink
  13. val clientParam: RichClientParam

    Permalink
    Attributes
    protected
    Definition Classes
    ClientThriftRichClient
  14. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  15. def configured[P](psp: (P, Param[P])): Client

    Permalink
    Definition Classes
    Client → EndpointerStackClient → StackClient → Parameterized
  16. def configured[P](p: P)(implicit arg0: Param[P]): Client

    Permalink
    Definition Classes
    EndpointerStackClient → StackClient → Parameterized
  17. def configuredParams(newParams: Params): Client

    Permalink
    Definition Classes
    EndpointerStackClient → StackClient → Parameterized
  18. def copy1(stack: Stack[ServiceFactory[ThriftClientRequest, Array[Byte]]] = this.stack, params: Params = this.params): Client

    Permalink
    Attributes
    protected
    Definition Classes
    Client → StdStackClient → EndpointerStackClient
  19. lazy val defaultClientName: String

    Permalink

    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]]]

    Permalink
    Attributes
    protected
    Definition Classes
    StdStackClient → EndpointerStackClient
  21. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. def filtered(filter: Filter[ThriftClientRequest, Array[Byte], ThriftClientRequest, Array[Byte]]): Client

    Permalink
    Definition Classes
    Client → EndpointerStackClient
  23. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  24. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  25. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  26. def multiplex[T](dest: String, label: String)(build: (MultiplexedThriftClient) ⇒ T): T

    Permalink

    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.FutureIface]("echo")
        val extendedEcho = client.newServiceIface[ExtendedEcho.ServiceIface]("extendedEcho")
      }
    }
    
    client.echo.echo("hello")
    client.extendedEcho.getStatus(ExtendedEcho.GetStatus.Args())
    Definition Classes
    ThriftRichClient
  27. def multiplex[T](dest: Name, label: String)(build: (MultiplexedThriftClient) ⇒ T): T

    Permalink

    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.FutureIface]("echo")
        val extendedEcho = client.newServiceIface[ExtendedEcho.ServiceIface]("extendedEcho")
      }
    }
    
    client.echo.echo("hello")
    client.extendedEcho.getStatus(ExtendedEcho.GetStatus.Args())
    Definition Classes
    ThriftRichClient
  28. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  29. def newClient(dest: Name, label: String): ServiceFactory[ThriftClientRequest, Array[Byte]]

    Permalink
    Definition Classes
    Client → EndpointerStackClient → Client
  30. final def newClient(dest: String, label: String): ServiceFactory[ThriftClientRequest, Array[Byte]]

    Permalink
    Definition Classes
    Client
  31. final def newClient(dest: String): ServiceFactory[ThriftClientRequest, Array[Byte]]

    Permalink
    Definition Classes
    Client
  32. def newDispatcher(transport: Transport[ThriftClientRequest, Array[Byte]] { type Context <: Client.this.Context }): Service[ThriftClientRequest, Array[Byte]]

    Permalink
    Attributes
    protected
    Definition Classes
    Client → StdStackClient
  33. def newService(dest: Name, label: String): Service[ThriftClientRequest, Array[Byte]]

    Permalink
    Definition Classes
    EndpointerStackClient → Client
  34. final def newService(dest: String, label: String): Service[ThriftClientRequest, Array[Byte]]

    Permalink
    Definition Classes
    Client
  35. final def newService(dest: String): Service[ThriftClientRequest, Array[Byte]]

    Permalink
    Definition Classes
    Client
  36. def newServicePerEndpoint[ServicePerEndpoint <: Filterable[ServicePerEndpoint]](service: Service[ThriftClientRequest, Array[Byte]], label: String)(implicit builder: ServicePerEndpointBuilder[ServicePerEndpoint]): ServicePerEndpoint

    Permalink

    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
  37. def newTransporter(addr: SocketAddress): Transporter[In, Out, Context]

    Permalink
    Attributes
    protected
    Definition Classes
    Client → StdStackClient
  38. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  40. val params: Params

    Permalink

    The Stack.Params to be used by this client.

    The Stack.Params to be used by this client.

    Both defaultClientName and stats predate Stack.Params and as such are implemented separately.

    Definition Classes
    ClientThriftRichClient → StackClient → Parameterized
  41. final def registerTransporter(transporterName: String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    StackClient
  42. def servicePerEndpoint[ServicePerEndpoint <: Filterable[ServicePerEndpoint]](dest: Name, label: String)(implicit builder: ServicePerEndpointBuilder[ServicePerEndpoint]): ServicePerEndpoint

    Permalink

    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
  43. def servicePerEndpoint[ServicePerEndpoint <: Filterable[ServicePerEndpoint]](dest: String, label: String)(implicit builder: ServicePerEndpointBuilder[ServicePerEndpoint]): ServicePerEndpoint

    Permalink

    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
  44. val stack: Stack[ServiceFactory[ThriftClientRequest, Array[Byte]]]

    Permalink
    Definition Classes
    Client → StackClient
  45. def stats: StatsReceiver

    Permalink
    Attributes
    protected
    Definition Classes
    ThriftRichClient
  46. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  47. def transformed(t: Transformer): StackClient[ThriftClientRequest, Array[Byte]]

    Permalink
    Definition Classes
    StackClient → Transformable
  48. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. val withAdmissionControl: ClientAdmissionControlParams[Client]

    Permalink
    Definition Classes
    Client → WithClientAdmissionControl
  52. def withAttemptTTwitterUpgrade: Client

    Permalink
  53. def withBufferedTransport: Client

    Permalink

    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.

  54. def withClientId(clientId: ClientId): Client

    Permalink
  55. def withExceptionStatsHandler(exceptionStatsHandler: ExceptionStatsHandler): Client

    Permalink
    Definition Classes
    Client → CommonParams
  56. def withExecutionOffloaded(executor: ExecutorService): Client

    Permalink
    Definition Classes
    CommonParams
  57. def withExecutionOffloaded(pool: FuturePool): Client

    Permalink
    Definition Classes
    CommonParams
  58. def withLabel(label: String): Client

    Permalink
    Definition Classes
    Client → CommonParams
  59. def withLabels(keywords: String*): Client

    Permalink
    Definition Classes
    CommonParams
  60. val withLoadBalancer: DefaultLoadBalancingParams[Client]

    Permalink
    Definition Classes
    Client → WithDefaultLoadBalancer
  61. def withMaxReusableBufferSize(size: Int): Client

    Permalink

    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.

  62. def withMonitor(monitor: Monitor): Client

    Permalink
    Definition Classes
    Client → CommonParams
  63. def withNoAttemptTTwitterUpgrade: Client

    Permalink
  64. def withParams(params: Params): Client

    Permalink
    Definition Classes
    EndpointerStackClient → StackClient → Parameterized
  65. def withPerEndpointStats: Client

    Permalink

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

  66. def withProtocolFactory(protocolFactory: TProtocolFactory): Client

    Permalink
  67. def withRequestTimeout(timeout: Duration): Client

    Permalink
    Definition Classes
    Client → CommonParams
  68. def withRequestTimeout(timeout: Tunable[Duration]): Client

    Permalink
    Definition Classes
    CommonParams
  69. def withResponseClassifier(responseClassifier: ResponseClassifier): Client

    Permalink
    Definition Classes
    Client → CommonParams
  70. def withRetryBackoff(backoff: Stream[Duration]): Client

    Permalink
    Definition Classes
    Client → ClientParams
  71. def withRetryBudget(budget: RetryBudget): Client

    Permalink
    Definition Classes
    Client → ClientParams
  72. val withSession: ClientSessionParams[Client]

    Permalink
    Definition Classes
    Client → WithClientSession
  73. val withSessionPool: SessionPoolingParams[Client]

    Permalink
    Definition Classes
    Client → WithSessionPool
  74. val withSessionQualifier: SessionQualificationParams[Client]

    Permalink
    Definition Classes
    Client → WithSessionQualifier
  75. def withStack(fn: (Stack[ServiceFactory[ThriftClientRequest, Array[Byte]]]) ⇒ Stack[ServiceFactory[ThriftClientRequest, Array[Byte]]]): Client

    Permalink
    Definition Classes
    Client → EndpointerStackClient → StackClient
  76. def withStack(stack: Stack[ServiceFactory[ThriftClientRequest, Array[Byte]]]): Client

    Permalink
    Definition Classes
    Client → EndpointerStackClient → StackClient
  77. def withStatsReceiver(statsReceiver: StatsReceiver): Client

    Permalink
    Definition Classes
    Client → CommonParams
  78. def withTracer(tracer: Tracer): Client

    Permalink
    Definition Classes
    Client → CommonParams
  79. val withTransport: ClientTransportParams[Client]

    Permalink
    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

    Permalink
    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

    Permalink

    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$FutureIface 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

    Permalink

    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$FutureIface 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

    Permalink

    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$FutureIface 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

    Permalink

    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$FutureIface 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

    Permalink

    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$FutureIface 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

    Permalink

    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$FutureIface 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

    Permalink

    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$FutureIface 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

    Permalink

    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

    Permalink

    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

    Permalink
    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