Package org.apache.qpid.protonj2.codec
Class CodecFactory
java.lang.Object
org.apache.qpid.protonj2.codec.CodecFactory
Factory Class used to create new instances of AMQP type
 Encoder and Decoder instances registered in the factory.
- 
Method SummaryModifier and TypeMethodDescriptionstatic Decoderstatic Decoderstatic Encoderstatic Decoderstatic Encoderstatic Encoderstatic Decoderstatic Encoderstatic voidsetDecoder(Decoder decoder) Sets anDecoderinstance that will be returned from all calls to thegetDecoder().static voidsetEncoder(Encoder encoder) Sets anEncoderinstance that will be returned from all calls to thegetEncoder().static voidsetSaslDecoder(Decoder decoder) Sets anDecoderinstance that will be returned from all calls to thegetSaslDecoder().static voidsetSaslEncoder(Encoder encoder) Sets anEncoderinstance that will be returned from all calls to thegetSaslEncoder().
- 
Method Details- 
setEncoderSets anEncoderinstance that will be returned from all calls to thegetEncoder(). If noEncoderis 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/
 
- 
setDecoderSets anDecoderinstance that will be returned from all calls to thegetDecoder(). If noDecoderis 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/
 
- 
setSaslEncoderSets anEncoderinstance that will be returned from all calls to thegetSaslEncoder(). If noEncoderis 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/
 
- 
setSaslDecoderSets anDecoderinstance that will be returned from all calls to thegetSaslDecoder(). If noDecoderis 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/
 
- 
getEncoder- Returns:
- a cached Encoderinstance that resulted from a call togetDefaultEncoder()if not set externally.
 
- 
getDecoder- Returns:
- a cached Decoderinstance that resulted from a call togetDefaultDecoder()if not set externally.
 
- 
getSaslEncoder- Returns:
- a cached Encoderinstance that resulted from a call togetDefaultSaslEncoder()if not set externally.
 
- 
getSaslDecoder- Returns:
- a cached Decoderinstance that resulted from a call togetSaslDecoder()if not set externally.
 
- 
getDefaultEncoder- Returns:
- a new instance of the Proton default Encoderimplementation.
 
- 
getDefaultDecoder- Returns:
- a new instance of the Proton default Decoderimplementation.
 
- 
getDefaultSaslEncoder- Returns:
- a new instance of the Proton default SASL only Encoderimplementation.
 
- 
getDefaultSaslDecoder- Returns:
- a new instance of the Proton default SASL only Decoderimplementation.
 
 
-