com.twitter.finagle

thrift

package thrift

Deprecation

Please use the new interface, com.twitter.finagle.Thrift, for constructing thrift clients and servers.

Thrift codecs

We provide both framed and buffered client protocol support, and server support for the framed protocol. The public implementations are:

The type of the server codec is Service[Array[Byte], Array[Byte]] and the client codecs are Service[ThriftClientRequest, Array[Byte]]. The service provided is that of a "transport" of thrift messages (requests and replies) according to the protocol chosen. This is why the client codecs need to have access to a thrift ProtocolFactory.

These transports are used by the services produced by the finagle thrift codegenerator.

val service: Service[ThriftClientRequest, Array[Byte]] = ClientBuilder()
  .hosts("foobar.com:123")
  .codec(ThriftClientFramedCodec())
  .build()

// Wrap the raw Thrift transport in a Client decorator. The client
// provides a convenient procedural interface for accessing the Thrift
// server.
val client = new Hello.ServiceToClient(service, protocolFactory)

In this example, Hello is the thrift interface, and the inner class ServiceToClient is provided by the finagle thrift code generator.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. thrift
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. case class ClientId(name: String) extends Product with Serializable

  2. class ClientIdRequiredFilter[Req, Rep] extends SimpleFilter[Req, Rep]

    This filter can only be used with finagle thrift codec.

  3. case class InvalidThriftConnectionException() extends Exception with ServiceException with Product with Serializable

  4. class NoClientIdSpecifiedException extends RequestException

  5. class SeqIdFilter extends SimpleFilter[ThriftClientRequest, Array[Byte]]

    A filter to override the input sequence ids, replacing them with ones of our own provenance.

  6. case class SeqMismatchException(id: Int, expected: Int) extends TransportException with Product with Serializable

  7. class ThriftBufferedListener extends Netty3Listener[Array[Byte], Array[Byte]]

    A Listener for the Apache Thrift buffered transport.

  8. class ThriftBufferedTransporter extends Netty3Transporter[ThriftClientRequest, Array[Byte]]

  9. class ThriftCall[A <: TBase[_, _], R <: TBase[_, _]] extends AnyRef

    The ThriftCall object represents a thrift dispatch on the channel.

  10. class ThriftCallFactory[A <: TBase[_, _], R <: TBase[_, _]] extends AnyRef

  11. class ThriftClient extends DefaultClient[ThriftClientRequest, Array[Byte]]

    A Finagle Client for Apache Thrift.

  12. class ThriftClientBufferedCodec extends ThriftClientFramedCodec

  13. class ThriftClientBufferedCodecFactory extends (ClientCodecConfig) ⇒ Codec[ThriftClientRequest, Array[Byte]]

  14. class ThriftClientFramedCodec extends Codec[ThriftClientRequest, Array[Byte]]

  15. class ThriftClientFramedCodecFactory extends (ClientCodecConfig) ⇒ Codec[ThriftClientRequest, Array[Byte]]

  16. class ThriftClientRequest extends AnyRef

  17. case class ThriftReply[R <: TBase[_, _]](response: R, call: ThriftCall[_ <: TBase[_, _], _ <: TBase[_, _]]) extends Product with Serializable

    Encapsulates the result of a call to a Thrift service.

  18. class ThriftServerBufferedCodec extends ThriftServerFramedCodec

  19. class ThriftServerBufferedCodecFactory extends (ServerCodecConfig) ⇒ Codec[Array[Byte], Array[Byte]]

  20. class ThriftServerFramedCodec extends Codec[Array[Byte], Array[Byte]]

  21. class ThriftServerFramedCodecFactory extends (ServerCodecConfig) ⇒ Codec[Array[Byte], Array[Byte]]

  22. class ValidateThriftService extends ServiceProxy[ThriftClientRequest, Array[Byte]]

    A filter that invalidates the a connection if it suffers an irrecoverable application exception.

Value Members

  1. object ClientId extends Serializable

    ClientId provides the client identification of the incoming request if available.

  2. object InputBuffers

  3. object Protocols

  4. object SeqIdFilter

  5. object ThriftBufferedListener extends Serializable

  6. object ThriftBufferedTransporter extends Serializable

  7. object ThriftClientBufferedCodec

    ThriftClientBufferedCodec implements a buffered thrift transport that supports upgrading in order to provide TraceContexts across requests.

  8. object ThriftClientFramedCodec

    ThriftClientFramedCodec implements a framed thrift transport that supports upgrading in order to provide TraceContexts across requests.

  9. object ThriftFramedListener extends Netty3Listener[Array[Byte], Array[Byte]]

    A Listener for the Apache Thrift framed transport.

  10. object ThriftServerBufferedCodec

    ThriftServerBufferedCodec implements a buffered thrift transport.

  11. object ThriftServerFramedCodec

  12. object ThriftTypes extends HashMap[String, ThriftCallFactory[_, _]]

    A registry for Thrift types.

  13. package thrift

Inherited from AnyRef

Inherited from Any

Ungrouped