Class ProtonEncoderState
java.lang.Object
org.apache.qpid.protonj2.codec.encoders.ProtonEncoderState
- All Implemented Interfaces:
- EncoderState
State object used by the Built in Encoder implementation.
- 
Constructor SummaryConstructorsConstructorDescriptionProtonEncoderState(ProtonEncoder encoder) Creates a newProtonEncoderStatethat is linked to the givenProtonEncoder.
- 
Method SummaryModifier and TypeMethodDescriptionencodeUTF8(ProtonBuffer buffer, CharSequence sequence) Encodes the given sequence of characters in UTF8 to the given buffer.reset()Resets any intermediate state back to default values.setUTF8Encoder(UTF8Encoder utf8Encoder) Configures a customUTF8Encoderinstance that will be used for all String decoding done by the parentEncoderinstance.
- 
Constructor Details- 
ProtonEncoderStateCreates a newProtonEncoderStatethat is linked to the givenProtonEncoder.- Parameters:
- encoder- The- Encoderthat this encoder state instance is assigned to.
 
 
- 
- 
Method Details- 
getEncoder- Specified by:
- getEncoderin interface- EncoderState
- Returns:
- the Encoder instance that create this state object.
 
- 
getUTF8Encoder- Returns:
- the user configured custom UTF8Encoderinstance or null if none set.
 
- 
setUTF8EncoderConfigures a customUTF8Encoderinstance that will be used for all String decoding done by the parentEncoderinstance.- Parameters:
- utf8Encoder- The user specified- UTF8Encoderor null to clear a previous configuration.
- Returns:
- this Encoderinstance.
 
- 
resetDescription copied from interface:EncoderStateResets any intermediate state back to default values.- Specified by:
- resetin interface- EncoderState
- Returns:
- this EncoderStateinstance.
 
- 
encodeUTF8Description copied from interface:EncoderStateEncodes the given sequence of characters in UTF8 to the given buffer.- Specified by:
- encodeUTF8in interface- EncoderState
- Parameters:
- buffer- A ProtonBuffer where the UTF-8 encoded bytes should be written.
- sequence- A- CharSequencerepresenting the UTF-8 bytes to encode
- Returns:
- a reference to the encoding buffer for chaining
 
 
-