A com.twitter.finagle.Filter for Thrift services that enforces all requests specify a com.twitter.finagle.thrift.ClientId.
Indicates that the connection on which a Thrift request was issued is invalid, where "validity" is determined by com.twitter.finagle.thrift.ValidateThriftService.
Indicates that a request without a com.twitter.finagle.thrift.ClientId was issued to a server that requires them.
Indicates that a request without a com.twitter.finagle.thrift.ClientId was issued to a server that requires them. See com.twitter.finagle.thrift.ClientIdRequiredFilter for details.
A com.twitter.finagle.Filter that overrides Thrift request sequence IDs, replacing them with our own randomly-assigned i32s.
A com.twitter.finagle.Filter that overrides Thrift request sequence IDs, replacing them with our own randomly-assigned i32s. Upon response receipt, this filter ensures that responses have the correct corresponding sequence ID, failing any requests that do not.
This only works when using BinaryProtocol.
Indicates that a Thrift response did not have the correct sequence ID according to that assigned by com.twitter.finagle.thrift.SeqIdFilter on the corresponding request.
The ThriftCall object represents a thrift dispatch on the channel.
The ThriftCall object represents a thrift dispatch on the channel. The method name & argument thrift structure (POJO) is given.
Encapsulates the result of a call to a Thrift service.
A filter that invalidates a connection if it suffers from an irrecoverable application exception.
A filter that invalidates a connection if it suffers from an irrecoverable application exception.
Amazingly, an Apache Thrift server will leave a connection in a bad state without closing it, and furthermore only expose such errors as an "application" exception.
All we can do is sigh, pinch our noses, and apply
ValidateThriftService
.
ClientId
provides the client identification of the incoming request if available.
ClientId
provides the client identification of the incoming request if available.
It is set at the beginning of the request and is available throughout the life-cycle
of the request. It is iff the client has an upgraded finagle connection and has chosen
to specify the client ID in their codec.
ThriftClientBufferedCodec implements a buffered thrift transport that supports upgrading in order to provide TraceContexts across requests.
ThriftClientFramedCodec implements a framed thrift transport that supports upgrading in order to provide TraceContexts across requests.
ThriftServerBufferedCodec implements a buffered thrift transport.
A registry for Thrift types.
A registry for Thrift types. Register ThriftCallFactory instances encapsulating the types to be decoded by the ThriftServerCodec with this singleton.
Server and client codecs will use these types for marshalling.
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 areService[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 thriftProtocolFactory
.These transports are used by the services produced by the finagle thrift codegenerator.
In this example,
Hello
is the thrift interface, and the inner classServiceToClient
is provided by the finagle thrift code generator.