The codec's native byte buffer (or array) representation.
The codec's native byte buffer (or array) representation.
Represents a codec for a given type.
Represents a codec for a given type.
A codec for application errors.
A codec for application errors.
Implementations may decide which errors they wish to serialize. By default we only encode a few exceptions from the standard library.
Returns an instance of com.twitter.finagle.Client with com.twitter.finagle.Server of concrete serial protocol from Req to Rep.
Returns an instance of com.twitter.finagle.Client with com.twitter.finagle.Server of concrete serial protocol from Req to Rep.
val server = Serial[Foo, Bar].serve(...) val client = Serial[Foo, Bar].newService(...)
the request type
the response type
the request codec
the response codec
Create a com.twitter.finagle.Client given request and response codecs.
Create a com.twitter.finagle.Client given request and response codecs.
A codec for encoding errors.
A codec for encoding errors.
Because encoding errors are sent over the wire, an implementation needs to specify how to encode them.
Decode a result.
Decode a result.
An implementation should deserialize the errors returned its io.github.finagle.Serial#encodeRep.
Decode a request.
Decode a request.
An implementation should decode io.github.finagle.serial.CodecError and return instances as an error.
Encode a result.
Encode a result.
An implementation should fail with io.github.finagle.serial.CodecError in the event of a encoding error.
Encode a request.
Encode a request.
A "well-behaved" implementation should only fail with instances of io.github.finagle.serial.CodecError; all other errors will result in an com.twitter.finagle.mux.ServerApplicationError being returned.
Convert a com.twitter.io.Buf to this implementation's byte buffer representation.
Convert a com.twitter.io.Buf to this implementation's byte buffer representation.
A convenience method that creates a server from a function.
A convenience method that creates a server from a function.
Create a com.twitter.finagle.Server given request and response codecs.
Create a com.twitter.finagle.Server given request and response codecs.
Convert the implementation's representation of a byte buffer to a com.twitter.io.Buf.
Convert the implementation's representation of a byte buffer to a com.twitter.io.Buf.
A codec for "fall-back" errors.
A codec for "fall-back" errors.
This will be used if applicationErrorCodec does not successfully encode an application error.