trait ThriftRichClient extends AnyRef
A mixin trait to provide a rich Thrift client API.
- Self Type
- ThriftRichClient with StackBasedClient[ThriftClientRequest, Array[Byte]]
- Alphabetic
- By Inheritance
- ThriftRichClient
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- class MultiplexedThriftClient extends AnyRef
Abstract Value Members
-
abstract
val
clientParam: RichClientParam
- Attributes
- protected
-
abstract
val
defaultClientName: String
The client name used when group isn't named.
The client name used when group isn't named.
- Attributes
- protected
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
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
Classpassed in should be eitherServiceName$MethodPerEndpointorServiceName[Future].For Java generated code, the
Classpassed in should beServiceName$ServiceIface. -
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
Classpassed in should be eitherServiceName$MethodPerEndpointorServiceName[Future].For Java generated code, the
Classpassed in should beServiceName$ServiceIface. -
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
Classpassed in should be eitherServiceName$MethodPerEndpointorServiceName[Future].For Java generated code, the
Classpassed in should beServiceName$ServiceIface. -
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
Classpassed in should be eitherServiceName$MethodPerEndpointorServiceName[Future].For Java generated code, the
Classpassed in should beServiceName$ServiceIface. -
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
Classpassed in should be eitherServiceName$MethodPerEndpointorServiceName[Future].For Java generated code, the
Classpassed in should beServiceName$ServiceIface. -
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
Classpassed in should be eitherServiceName$MethodPerEndpointorServiceName[Future].For Java generated code, the
Classpassed in should beServiceName$ServiceIface. -
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
Classpassed in should be eitherServiceName$MethodPerEndpointorServiceName[Future].For Java generated code, the
Classpassed in should beServiceName$ServiceIface. -
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
multiplex[T](dest: String, label: String)(build: ((ThriftRichClient.this)#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())
-
def
multiplex[T](dest: Name, label: String)(build: ((ThriftRichClient.this)#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())
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
newServicePerEndpoint[ServicePerEndpoint <: Filterable[ServicePerEndpoint]](service: Service[ThriftClientRequest, Array[Byte]], label: String)(implicit builder: ServicePerEndpointBuilder[ServicePerEndpoint]): ServicePerEndpoint
Construct a Finagle
Serviceinterface for a Scrooge-generated Thrift object.Construct a Finagle
Serviceinterface 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.Requestandc.t.scrooge.Responseheaders.- 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
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
servicePerEndpoint[ServicePerEndpoint <: Filterable[ServicePerEndpoint]](dest: Name, label: String)(implicit builder: ServicePerEndpointBuilder[ServicePerEndpoint]): ServicePerEndpoint
Construct a Finagle
Serviceinterface for a Scrooge-generated Thrift object.Construct a Finagle
Serviceinterface 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.Requestandc.t.scrooge.Responseheaders.- 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.
-
def
servicePerEndpoint[ServicePerEndpoint <: Filterable[ServicePerEndpoint]](dest: String, label: String)(implicit builder: ServicePerEndpointBuilder[ServicePerEndpoint]): ServicePerEndpoint
Construct a Finagle
Serviceinterface for a Scrooge-generated Thrift object.Construct a Finagle
Serviceinterface 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.Requestandc.t.scrooge.Responseheaders.- 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.
-
def
stats: StatsReceiver
- Attributes
- protected
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
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
- @throws( ... ) @native()
Deprecated Value Members
-
def
newIface[Iface](name: Name, label: String, cls: Class[_], protocolFactory: TProtocolFactory, service: Service[ThriftClientRequest, Array[Byte]]): Iface
- Annotations
- @deprecated
- Deprecated
(Since version 2017-8-16) Use com.twitter.finagle.thrift.RichClientParam
-
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
Classpassed in should be eitherServiceName$MethodPerEndpointorServiceName[Future].For Java generated code, the
Classpassed in should beServiceName$ServiceIface.- Annotations
- @deprecated
- Deprecated
(Since version 2017-11-20) Use com.twitter.finagle.ThriftRichClient#build
-
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
Classpassed in should be eitherServiceName$MethodPerEndpointorServiceName[Future].For Java generated code, the
Classpassed in should beServiceName$ServiceIface.- Annotations
- @deprecated
- Deprecated
(Since version 2017-11-20) Use com.twitter.finagle.ThriftRichClient#build
-
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
Classpassed in should be eitherServiceName$MethodPerEndpointorServiceName[Future].For Java generated code, the
Classpassed in should beServiceName$ServiceIface.- Annotations
- @deprecated
- Deprecated
(Since version 2017-11-20) Use com.twitter.finagle.ThriftRichClient#build
-
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
Classpassed in should be eitherServiceName$MethodPerEndpointorServiceName[Future].For Java generated code, the
Classpassed in should beServiceName$ServiceIface.- Annotations
- @deprecated
- Deprecated
(Since version 2017-11-20) Use com.twitter.finagle.ThriftRichClient#build
-
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
Classpassed in should be eitherServiceName$MethodPerEndpointorServiceName[Future].For Java generated code, the
Classpassed in should beServiceName$ServiceIface.- Annotations
- @deprecated
- Deprecated
(Since version 2017-11-20) Use com.twitter.finagle.ThriftRichClient#build
-
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
Classpassed in should be eitherServiceName$MethodPerEndpointorServiceName[Future].For Java generated code, the
Classpassed in should beServiceName$ServiceIface.- Annotations
- @deprecated
- Deprecated
(Since version 2017-11-20) Use com.twitter.finagle.ThriftRichClient#build
-
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
Classpassed in should be eitherServiceName$MethodPerEndpointorServiceName[Future].For Java generated code, the
Classpassed in should beServiceName$ServiceIface.- Annotations
- @deprecated
- Deprecated
(Since version 2017-11-20) Use com.twitter.finagle.ThriftRichClient#build
-
def
newServiceIface[ServiceIface <: Filterable[ServiceIface]](dest: Name, label: String)(implicit builder: ServiceIfaceBuilder[ServiceIface]): ServiceIface
Construct a Finagle
Serviceinterface for a Scrooge-generated Thrift object.Construct a Finagle
Serviceinterface 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.
- Annotations
- @deprecated
- Deprecated
(Since version 2017-11-13) Use com.twitter.finagle.ThriftRichClient#servicePerEndpoint[ServicePerEndpoint]
-
def
newServiceIface[ServiceIface <: Filterable[ServiceIface]](dest: String, label: String)(implicit builder: ServiceIfaceBuilder[ServiceIface]): ServiceIface
Construct a Finagle
Serviceinterface for a Scrooge-generated Thrift object.Construct a Finagle
Serviceinterface 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.
- Annotations
- @deprecated
- Deprecated
(Since version 2017-11-13) Use com.twitter.finagle.ThriftRichClient#servicePerEndpoint[ServicePerEndpoint]