Class Codec<E,D,A extends Address>

All Implemented Interfaces:
Handler
Direct Known Subclasses:
DefaultCodec

public abstract class Codec<E,D,A extends Address> extends SimpleDuplexHandler<E,Event,D,A>
Standard interface for all codecs of the Pipeline.
A codec can be used to encode/decode a given set of objects into the correct format to process the object in the ongoing steps.
A codec must have a symmetrical construction. encode(HandlerContext, Object, Consumer) converts an object of type D into type E and decode(HandlerContext, Object, Consumer) vice versa.

Note: You can use the HandlerContext.inboundValidator()} or HandlerContext.outboundValidator()} to check if a given Class is allowed to be encode/decode.