Class CodecFactory


  • public final class CodecFactory
    extends java.lang.Object
    Factory Class used to create new instances of AMQP type Encoder and Decoder instances registered in the factory.
    • Method Detail

      • setEncoder

        public static void setEncoder​(Encoder encoder)
        Sets an Encoder instance that will be returned from all calls to the getEncoder(). If no Encoder is configured then the calls to get an Encoder instance will return the default Encoder from the library.
        Parameters:
        encoder - The encoder to return from all calls to the getEncoder() method/
      • setDecoder

        public static void setDecoder​(Decoder decoder)
        Sets an Decoder instance that will be returned from all calls to the getDecoder(). If no Decoder is configured then the calls to get an Decoder instance will return the default Decoder from the library.
        Parameters:
        decoder - The decoder to return from all calls to the getDecoder() method/
      • setSaslEncoder

        public static void setSaslEncoder​(Encoder encoder)
        Sets an Encoder instance that will be returned from all calls to the getSaslEncoder(). If no Encoder is configured then the calls to get an Encoder instance will return the default Encoder from the library. The Encoder configured should only accept encodes of the SASL AMQP types.
        Parameters:
        encoder - The encoder to return from all calls to the getSaslEncoder() method/
      • setSaslDecoder

        public static void setSaslDecoder​(Decoder decoder)
        Sets an Decoder instance that will be returned from all calls to the getSaslDecoder(). If no Decoder is configured then the calls to get an Decoder instance will return the default Decoder from the library. The Decoder configured should only decode the SASL AMQP types.
        Parameters:
        decoder - The decoder to return from all calls to the getSaslDecoder() method/
      • getSaslDecoder

        public static Decoder getSaslDecoder()
        Returns:
        a cached Decoder instance that resulted from a call to getSaslDecoder() if not set externally.
      • getDefaultEncoder

        public static Encoder getDefaultEncoder()
        Returns:
        a new instance of the Proton default Encoder implementation.
      • getDefaultDecoder

        public static Decoder getDefaultDecoder()
        Returns:
        a new instance of the Proton default Decoder implementation.
      • getDefaultSaslEncoder

        public static Encoder getDefaultSaslEncoder()
        Returns:
        a new instance of the Proton default SASL only Encoder implementation.
      • getDefaultSaslDecoder

        public static Decoder getDefaultSaslDecoder()
        Returns:
        a new instance of the Proton default SASL only Decoder implementation.