Proton DotNet
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
Apache.Qpid.Proton.Codec.IDecoder Interface Reference

Defines a Decoder that handles translating the encoded AMQP performative bytes into the appropriate Proton AMQP types. More...

Inheritance diagram for Apache.Qpid.Proton.Codec.IDecoder:
Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder

Public Member Functions

IDecoderState NewDecoderState ()
 Creates and returns a new decoder state object that should be used when decoding values with the decoder instance.
 
bool? ReadBoolean (IProtonBuffer buffer, IDecoderState state)
 Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
bool ReadBoolean (IProtonBuffer buffer, IDecoderState state, bool defaultValue)
 Reads the encoded value from the given byte buffer and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
sbyte? ReadByte (IProtonBuffer buffer, IDecoderState state)
 Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
sbyte ReadByte (IProtonBuffer buffer, IDecoderState state, sbyte defaultValue)
 Reads the encoded value from the given byte buffer and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
byte? ReadUnsignedByte (IProtonBuffer buffer, IDecoderState state)
 Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
byte ReadUnsignedByte (IProtonBuffer buffer, IDecoderState state, byte defaultValue)
 Reads the encoded value from the given byte buffer and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
char? ReadCharacter (IProtonBuffer buffer, IDecoderState state)
 Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
char ReadCharacter (IProtonBuffer buffer, IDecoderState state, char defaultValue)
 Reads the encoded value from the given byte buffer and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
Decimal32 ReadDecimal32 (IProtonBuffer buffer, IDecoderState state)
 Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
Decimal64 ReadDecimal64 (IProtonBuffer buffer, IDecoderState state)
 Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
Decimal128 ReadDecimal128 (IProtonBuffer buffer, IDecoderState state)
 Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
short? ReadShort (IProtonBuffer buffer, IDecoderState state)
 Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
short ReadShort (IProtonBuffer buffer, IDecoderState state, short defaultValue)
 Reads the encoded value from the given byte buffer and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
ushort? ReadUnsignedShort (IProtonBuffer buffer, IDecoderState state)
 Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
ushort ReadUnsignedShort (IProtonBuffer buffer, IDecoderState state, ushort defaultValue)
 Reads the encoded value from the given byte buffer and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
int? ReadInteger (IProtonBuffer buffer, IDecoderState state)
 Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
int ReadInteger (IProtonBuffer buffer, IDecoderState state, int defaultValue)
 Reads the encoded value from the given byte buffer and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
uint? ReadUnsignedInteger (IProtonBuffer buffer, IDecoderState state)
 Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
uint ReadUnsignedInteger (IProtonBuffer buffer, IDecoderState state, uint defaultValue)
 Reads the encoded value from the given byte buffer and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
long? ReadLong (IProtonBuffer buffer, IDecoderState state)
 Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
long ReadLong (IProtonBuffer buffer, IDecoderState state, long defaultValue)
 Reads the encoded value from the given byte buffer and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
ulong? ReadUnsignedLong (IProtonBuffer buffer, IDecoderState state)
 Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
ulong ReadUnsignedLong (IProtonBuffer buffer, IDecoderState state, ulong defaultValue)
 Reads the encoded value from the given byte buffer and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
float? ReadFloat (IProtonBuffer buffer, IDecoderState state)
 Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
float ReadFloat (IProtonBuffer buffer, IDecoderState state, float defaultValue)
 Reads the encoded value from the given byte buffer and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
double? ReadDouble (IProtonBuffer buffer, IDecoderState state)
 Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
double ReadDouble (IProtonBuffer buffer, IDecoderState state, double defaultValue)
 Reads the encoded value from the given byte buffer and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
IProtonBuffer ReadBinary (IProtonBuffer buffer, IDecoderState state)
 Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
string ReadString (IProtonBuffer buffer, IDecoderState state)
 Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
Symbol ReadSymbol (IProtonBuffer buffer, IDecoderState state)
 Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
string ReadSymbolAsString (IProtonBuffer buffer, IDecoderState state)
 Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
ulong? ReadTimestamp (IProtonBuffer buffer, IDecoderState state)
 Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
Guid? ReadGuid (IProtonBuffer buffer, IDecoderState state)
 Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
object ReadObject (IProtonBuffer buffer, IDecoderState state)
 Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
ReadObject< T > (IProtonBuffer buffer, IDecoderState state)
 Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
T[] ReadMultiple< T > (IProtonBuffer buffer, IDecoderState state)
 Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
IDictionary< K, V > ReadMap< K, V > (IProtonBuffer buffer, IDecoderState state)
 Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
IList< V > ReadList< V > (IProtonBuffer buffer, IDecoderState state)
 Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
IDeliveryTag ReadDeliveryTag (IProtonBuffer buffer, IDecoderState state)
 This method expects to read a Binary encoded type from the provided stream and constructs a IDeliveryTag type that wraps the bytes encoded. If the encoding is NULL AMQP type then this method returns null.
 
ITypeDecoder ReadNextTypeDecoder (IProtonBuffer buffer, IDecoderState state)
 Reads from the given IProtonBuffer instance and returns a ITypeDecoder that can read the next encoded AMQP type from the byte stream. If an error occurs while attempting to read the encoded type a DecodeException is thrown.
 
ITypeDecoder PeekNextTypeDecoder (IProtonBuffer buffer, IDecoderState state)
 Peeks ahead in the given IProtonBuffer instance and returns a ITypeDecoder that can read the next encoded AMQP type from the byte stream. If an error occurs while attempting to read the encoded type a DecodeException is thrown. The underlying buffer state is not modified as a result of calling the peek ahead operation and the returned decoder will not correctly be able to read the encoded type until the type encoding bytes are read.
 
IDecoder RegisterDescribedTypeDecoder (IDescribedTypeDecoder decoder)
 Allows for a custom described type decoder to be registered with this decoder instance for use when decoding AMQP described types from incoming byte streams.
 

Properties

IDecoderState CachedDecoderState [get]
 Returns a cached decoder state instance that can be used be single threaded readers that use this decoder instance.
 

Detailed Description

Defines a Decoder that handles translating the encoded AMQP performative bytes into the appropriate Proton AMQP types.

Member Function Documentation

◆ NewDecoderState()

IDecoderState Apache.Qpid.Proton.Codec.IDecoder.NewDecoderState ( )

Creates and returns a new decoder state object that should be used when decoding values with the decoder instance.

Returns

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ PeekNextTypeDecoder()

ITypeDecoder Apache.Qpid.Proton.Codec.IDecoder.PeekNextTypeDecoder ( IProtonBuffer  buffer,
IDecoderState  state 
)

Peeks ahead in the given IProtonBuffer instance and returns a ITypeDecoder that can read the next encoded AMQP type from the byte stream. If an error occurs while attempting to read the encoded type a DecodeException is thrown. The underlying buffer state is not modified as a result of calling the peek ahead operation and the returned decoder will not correctly be able to read the encoded type until the type encoding bytes are read.

Template Parameters
TThe type that the decoder handles
Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadBinary()

IProtonBuffer Apache.Qpid.Proton.Codec.IDecoder.ReadBinary ( IProtonBuffer  buffer,
IDecoderState  state 
)

Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadBoolean() [1/2]

bool? Apache.Qpid.Proton.Codec.IDecoder.ReadBoolean ( IProtonBuffer  buffer,
IDecoderState  state 
)

Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadBoolean() [2/2]

bool Apache.Qpid.Proton.Codec.IDecoder.ReadBoolean ( IProtonBuffer  buffer,
IDecoderState  state,
bool  defaultValue 
)

Reads the encoded value from the given byte buffer and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
defaultValueThe default value to return for null encodings
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadByte() [1/2]

sbyte? Apache.Qpid.Proton.Codec.IDecoder.ReadByte ( IProtonBuffer  buffer,
IDecoderState  state 
)

Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadByte() [2/2]

sbyte Apache.Qpid.Proton.Codec.IDecoder.ReadByte ( IProtonBuffer  buffer,
IDecoderState  state,
sbyte  defaultValue 
)

Reads the encoded value from the given byte buffer and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
defaultValueThe default value to return for null encodings
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadCharacter() [1/2]

char? Apache.Qpid.Proton.Codec.IDecoder.ReadCharacter ( IProtonBuffer  buffer,
IDecoderState  state 
)

Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadCharacter() [2/2]

char Apache.Qpid.Proton.Codec.IDecoder.ReadCharacter ( IProtonBuffer  buffer,
IDecoderState  state,
char  defaultValue 
)

Reads the encoded value from the given byte buffer and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
defaultValueThe default value to return for null encodings
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadDecimal128()

Decimal128 Apache.Qpid.Proton.Codec.IDecoder.ReadDecimal128 ( IProtonBuffer  buffer,
IDecoderState  state 
)

Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadDecimal32()

Decimal32 Apache.Qpid.Proton.Codec.IDecoder.ReadDecimal32 ( IProtonBuffer  buffer,
IDecoderState  state 
)

Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadDecimal64()

Decimal64 Apache.Qpid.Proton.Codec.IDecoder.ReadDecimal64 ( IProtonBuffer  buffer,
IDecoderState  state 
)

Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadDeliveryTag()

IDeliveryTag Apache.Qpid.Proton.Codec.IDecoder.ReadDeliveryTag ( IProtonBuffer  buffer,
IDecoderState  state 
)

This method expects to read a Binary encoded type from the provided stream and constructs a IDeliveryTag type that wraps the bytes encoded. If the encoding is NULL AMQP type then this method returns null.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadDouble() [1/2]

double? Apache.Qpid.Proton.Codec.IDecoder.ReadDouble ( IProtonBuffer  buffer,
IDecoderState  state 
)

Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadDouble() [2/2]

double Apache.Qpid.Proton.Codec.IDecoder.ReadDouble ( IProtonBuffer  buffer,
IDecoderState  state,
double  defaultValue 
)

Reads the encoded value from the given byte buffer and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
defaultValueThe default value to return for null encodings
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadFloat() [1/2]

float? Apache.Qpid.Proton.Codec.IDecoder.ReadFloat ( IProtonBuffer  buffer,
IDecoderState  state 
)

Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadFloat() [2/2]

float Apache.Qpid.Proton.Codec.IDecoder.ReadFloat ( IProtonBuffer  buffer,
IDecoderState  state,
float  defaultValue 
)

Reads the encoded value from the given byte buffer and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
defaultValueThe default value to return for null encodings
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadGuid()

Guid? Apache.Qpid.Proton.Codec.IDecoder.ReadGuid ( IProtonBuffer  buffer,
IDecoderState  state 
)

Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadInteger() [1/2]

int? Apache.Qpid.Proton.Codec.IDecoder.ReadInteger ( IProtonBuffer  buffer,
IDecoderState  state 
)

Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadInteger() [2/2]

int Apache.Qpid.Proton.Codec.IDecoder.ReadInteger ( IProtonBuffer  buffer,
IDecoderState  state,
int  defaultValue 
)

Reads the encoded value from the given byte buffer and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
defaultValueThe default value to return for null encodings
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadList< V >()

IList< V > Apache.Qpid.Proton.Codec.IDecoder.ReadList< V > ( IProtonBuffer  buffer,
IDecoderState  state 
)

Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

◆ ReadLong() [1/2]

long? Apache.Qpid.Proton.Codec.IDecoder.ReadLong ( IProtonBuffer  buffer,
IDecoderState  state 
)

Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadLong() [2/2]

long Apache.Qpid.Proton.Codec.IDecoder.ReadLong ( IProtonBuffer  buffer,
IDecoderState  state,
long  defaultValue 
)

Reads the encoded value from the given byte buffer and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
defaultValueThe default value to return for null encodings
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadMap< K, V >()

IDictionary< K, V > Apache.Qpid.Proton.Codec.IDecoder.ReadMap< K, V > ( IProtonBuffer  buffer,
IDecoderState  state 
)

Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadMultiple< T >()

T[] Apache.Qpid.Proton.Codec.IDecoder.ReadMultiple< T > ( IProtonBuffer  buffer,
IDecoderState  state 
)

Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadNextTypeDecoder()

ITypeDecoder Apache.Qpid.Proton.Codec.IDecoder.ReadNextTypeDecoder ( IProtonBuffer  buffer,
IDecoderState  state 
)

Reads from the given IProtonBuffer instance and returns a ITypeDecoder that can read the next encoded AMQP type from the byte stream. If an error occurs while attempting to read the encoded type a DecodeException is thrown.

Template Parameters
TThe type that the decoder handles
Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadObject()

object Apache.Qpid.Proton.Codec.IDecoder.ReadObject ( IProtonBuffer  buffer,
IDecoderState  state 
)

Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadObject< T >()

Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadShort() [1/2]

short? Apache.Qpid.Proton.Codec.IDecoder.ReadShort ( IProtonBuffer  buffer,
IDecoderState  state 
)

Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadShort() [2/2]

short Apache.Qpid.Proton.Codec.IDecoder.ReadShort ( IProtonBuffer  buffer,
IDecoderState  state,
short  defaultValue 
)

Reads the encoded value from the given byte buffer and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
defaultValueThe default value to return for null encodings
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadString()

string Apache.Qpid.Proton.Codec.IDecoder.ReadString ( IProtonBuffer  buffer,
IDecoderState  state 
)

Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadSymbol()

Symbol Apache.Qpid.Proton.Codec.IDecoder.ReadSymbol ( IProtonBuffer  buffer,
IDecoderState  state 
)

Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadSymbolAsString()

string Apache.Qpid.Proton.Codec.IDecoder.ReadSymbolAsString ( IProtonBuffer  buffer,
IDecoderState  state 
)

Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadTimestamp()

ulong? Apache.Qpid.Proton.Codec.IDecoder.ReadTimestamp ( IProtonBuffer  buffer,
IDecoderState  state 
)

Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadUnsignedByte() [1/2]

byte? Apache.Qpid.Proton.Codec.IDecoder.ReadUnsignedByte ( IProtonBuffer  buffer,
IDecoderState  state 
)

Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadUnsignedByte() [2/2]

byte Apache.Qpid.Proton.Codec.IDecoder.ReadUnsignedByte ( IProtonBuffer  buffer,
IDecoderState  state,
byte  defaultValue 
)

Reads the encoded value from the given byte buffer and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
defaultValueThe default value to return for null encodings
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadUnsignedInteger() [1/2]

uint? Apache.Qpid.Proton.Codec.IDecoder.ReadUnsignedInteger ( IProtonBuffer  buffer,
IDecoderState  state 
)

Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadUnsignedInteger() [2/2]

uint Apache.Qpid.Proton.Codec.IDecoder.ReadUnsignedInteger ( IProtonBuffer  buffer,
IDecoderState  state,
uint  defaultValue 
)

Reads the encoded value from the given byte buffer and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
defaultValueThe default value to return for null encodings
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadUnsignedLong() [1/2]

ulong? Apache.Qpid.Proton.Codec.IDecoder.ReadUnsignedLong ( IProtonBuffer  buffer,
IDecoderState  state 
)

Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadUnsignedLong() [2/2]

ulong Apache.Qpid.Proton.Codec.IDecoder.ReadUnsignedLong ( IProtonBuffer  buffer,
IDecoderState  state,
ulong  defaultValue 
)

Reads the encoded value from the given byte buffer and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
defaultValueThe default value to return for null encodings
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadUnsignedShort() [1/2]

ushort? Apache.Qpid.Proton.Codec.IDecoder.ReadUnsignedShort ( IProtonBuffer  buffer,
IDecoderState  state 
)

Reads the encoded value from the given byte buffer and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ ReadUnsignedShort() [2/2]

ushort Apache.Qpid.Proton.Codec.IDecoder.ReadUnsignedShort ( IProtonBuffer  buffer,
IDecoderState  state,
ushort  defaultValue 
)

Reads the encoded value from the given byte buffer and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
bufferThe buffer to read the encoded value from
stateA decoder state instance to use when decoding
defaultValueThe default value to return for null encodings
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

◆ RegisterDescribedTypeDecoder()

IDecoder Apache.Qpid.Proton.Codec.IDecoder.RegisterDescribedTypeDecoder ( IDescribedTypeDecoder  decoder)

Allows for a custom described type decoder to be registered with this decoder instance for use when decoding AMQP described types from incoming byte streams.

Template Parameters
VType that the decoder manages
Parameters
decoderA described type decoder to register
Returns
This IDecoder instance.

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.

Property Documentation

◆ CachedDecoderState

IDecoderState Apache.Qpid.Proton.Codec.IDecoder.CachedDecoderState
get

Returns a cached decoder state instance that can be used be single threaded readers that use this decoder instance.

Returns
A cached decoder state object that can be used by single threaded readers

Implemented in Apache.Qpid.Proton.Codec.Decoders.ProtonDecoder.


The documentation for this interface was generated from the following file: