Proton DotNet
All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
Public Member Functions | Properties | List of all members
Apache.Qpid.Proton.Codec.Decoders.Primitives.AbstractMapTypeDecoder Class Referenceabstract

Base map type decoder used by decoders of various AMQP types that represent map style serialized objects. More...

Inheritance diagram for Apache.Qpid.Proton.Codec.Decoders.Primitives.AbstractMapTypeDecoder:
Apache.Qpid.Proton.Codec.Decoders.AbstractPrimitiveTypeDecoder Apache.Qpid.Proton.Codec.Decoders.Primitives.IMapTypeDecoder Apache.Qpid.Proton.Codec.IPrimitiveTypeDecoder Apache.Qpid.Proton.Codec.IPrimitiveTypeDecoder Apache.Qpid.Proton.Codec.ITypeDecoder Apache.Qpid.Proton.Codec.IStreamTypeDecoder Apache.Qpid.Proton.Codec.ITypeDecoder Apache.Qpid.Proton.Codec.IStreamTypeDecoder Apache.Qpid.Proton.Codec.Decoders.Primitives.Map32TypeDecoder Apache.Qpid.Proton.Codec.Decoders.Primitives.Map8TypeDecoder

Public Member Functions

IDictionary< K, V > ReadMap< K, V > (IProtonBuffer buffer, IDecoderState state)
 Attempts to read and decode an AMQP Map from the given incoming byte buffer. The decoder applies type restrictions to the incoming Map based on the types given in the methods generic parameters. The resulting IDictionary is created using the type parameters provided to this method. More...
 
IDictionary< K, V > ReadMap< K, V > (Stream stream, IStreamDecoderState state)
 Attempts to read and decode an AMQP Map from the given incoming byte stream. The decoder applies type restrictions to the incoming Map based on the types given in the methods generic parameters. The resulting IDictionary is created using the type parameters provided to this method. More...
 
override object ReadValue (IProtonBuffer buffer, IDecoderState state)
 Reads this decoders managed type from the given buffer and returns it. More...
 
override object ReadValue (Stream stream, IStreamDecoderState state)
 Reads this decoders managed type from the given buffer and returns it. More...
 
override void SkipValue (IProtonBuffer buffer, IDecoderState state)
 Skips the value that this decoder is handling by skipping the encoded bytes in the provided buffer instance. More...
 
override void SkipValue (Stream stream, IStreamDecoderState state)
 Skips the value that this decoder is handling by skipping the encoded bytes in the provided buffer instance. More...
 
abstract int ReadCount (IProtonBuffer buffer, IDecoderState state)
 Reads the number of elements contained in the encoded map from the provided IProtonBuffer. The implementation must read the correct size encoding based on the type of map that this type decoder handles. More...
 
abstract int ReadCount (Stream stream, IStreamDecoderState state)
 Reads the number of elements contained in the encoded map from the provided Stream. The implementation must read the correct size encoding based on the type of map that this type decoder handles. More...
 
abstract int ReadSize (IProtonBuffer buffer, IDecoderState state)
 Reads the encoded size value for the encoded map payload and returns it. The read is destructive and the type decoder read methods cannot be called after this this unless the IProtonBuffer is reset via a position marker. This method can be useful when the caller intends to manually read the binary payload from the given IProtonBuffer. More...
 
abstract int ReadSize (Stream stream, IStreamDecoderState state)
 Reads the encoded size value for the encoded map payload and returns it. The read is destructive and the type decoder read methods cannot be called after this this unless the Stream is reset via a position marker. This method can be useful when the caller intends to manually read the binary payload from the given stream. More...
 
- Public Member Functions inherited from Apache.Qpid.Proton.Codec.Decoders.AbstractPrimitiveTypeDecoder
Array ReadArrayElements (IProtonBuffer buffer, IDecoderState state, int count)
 Reads a series of this type that have been encoded into the body of an Array type. When encoded into an array the values are encoded in series following the identifier for the type, this method is given a count of the number of instances that are encoded and should read each in succession and returning them in a new array. More...
 
Array ReadArrayElements (Stream stream, IStreamDecoderState state, int count)
 Reads a series of this type that have been encoded into the body of an Array type. When encoded into an array the values are encoded in series following the identifier for the type, this method is given a count of the number of instances that are encoded and should read each in succession and returning them in a new array. More...
 

Properties

override Type DecodesType [get]
 
- Properties inherited from Apache.Qpid.Proton.Codec.Decoders.AbstractPrimitiveTypeDecoder
bool IsArrayType [get]
 
abstract EncodingCodes EncodingCode [get]
 
abstract Type DecodesType [get]
 
- Properties inherited from Apache.Qpid.Proton.Codec.IPrimitiveTypeDecoder
EncodingCodes EncodingCode [get]
 Get the AMQP encoding code byte for the type this decoder handles. More...
 
- Properties inherited from Apache.Qpid.Proton.Codec.ITypeDecoder
Type DecodesType [get]
 The Type that this decoder can read. More...
 
bool IsArrayType [get]
 Returns true if the value that this decoder is going to read is an array type. More...
 
- Properties inherited from Apache.Qpid.Proton.Codec.IStreamTypeDecoder
Type DecodesType [get]
 The Type that this decoder can read. More...
 
bool IsArrayType [get]
 Returns true if the value that this decoder is going to read is an array type. More...
 

Detailed Description

Base map type decoder used by decoders of various AMQP types that represent map style serialized objects.

Member Function Documentation

◆ ReadCount() [1/2]

abstract int Apache.Qpid.Proton.Codec.Decoders.Primitives.AbstractMapTypeDecoder.ReadCount ( IProtonBuffer  buffer,
IDecoderState  state 
)
pure virtual

Reads the number of elements contained in the encoded map from the provided IProtonBuffer. The implementation must read the correct size encoding based on the type of map that this type decoder handles.

Parameters
bufferThe buffer where the count should be read from
stateThe decoder state that provides support
Returns
the count of the map elements that is encoded in the given buffer

Implements Apache.Qpid.Proton.Codec.Decoders.Primitives.IMapTypeDecoder.

Implemented in Apache.Qpid.Proton.Codec.Decoders.Primitives.Map8TypeDecoder, and Apache.Qpid.Proton.Codec.Decoders.Primitives.Map32TypeDecoder.

◆ ReadCount() [2/2]

abstract int Apache.Qpid.Proton.Codec.Decoders.Primitives.AbstractMapTypeDecoder.ReadCount ( Stream  stream,
IStreamDecoderState  state 
)
pure virtual

Reads the number of elements contained in the encoded map from the provided Stream. The implementation must read the correct size encoding based on the type of map that this type decoder handles.

Parameters
streamThe stream where the element count should be read from
stateThe decoder state that provides support
Returns
the count of the map elements that is encoded in the given buffer

Implements Apache.Qpid.Proton.Codec.Decoders.Primitives.IMapTypeDecoder.

Implemented in Apache.Qpid.Proton.Codec.Decoders.Primitives.Map8TypeDecoder, and Apache.Qpid.Proton.Codec.Decoders.Primitives.Map32TypeDecoder.

◆ ReadMap< K, V >() [1/2]

IDictionary<K, V> Apache.Qpid.Proton.Codec.Decoders.Primitives.AbstractMapTypeDecoder.ReadMap< K, V > ( IProtonBuffer  buffer,
IDecoderState  state 
)
inline

Attempts to read and decode an AMQP Map from the given incoming byte buffer. The decoder applies type restrictions to the incoming Map based on the types given in the methods generic parameters. The resulting IDictionary is created using the type parameters provided to this method.

Template Parameters
KThe type restriction for the keys of the Map
VThe type restriction for the values of the Map
Parameters
bufferThe buffer where the Map should be read from
stateThe decoder state that provides support
Returns
An IDictionary that was created using the type parameters

Implements Apache.Qpid.Proton.Codec.Decoders.Primitives.IMapTypeDecoder.

◆ ReadMap< K, V >() [2/2]

IDictionary<K, V> Apache.Qpid.Proton.Codec.Decoders.Primitives.AbstractMapTypeDecoder.ReadMap< K, V > ( Stream  stream,
IStreamDecoderState  state 
)
inline

Attempts to read and decode an AMQP Map from the given incoming byte stream. The decoder applies type restrictions to the incoming Map based on the types given in the methods generic parameters. The resulting IDictionary is created using the type parameters provided to this method.

Template Parameters
KThe type restriction for the keys of the Map
VThe type restriction for the values of the Map
Parameters
streamThe stream where the Map should be read from
stateThe decoder state that provides support
Returns
An IDictionary that was created using the type parameters

Implements Apache.Qpid.Proton.Codec.Decoders.Primitives.IMapTypeDecoder.

◆ ReadSize() [1/2]

abstract int Apache.Qpid.Proton.Codec.Decoders.Primitives.AbstractMapTypeDecoder.ReadSize ( IProtonBuffer  buffer,
IDecoderState  state 
)
pure virtual

Reads the encoded size value for the encoded map payload and returns it. The read is destructive and the type decoder read methods cannot be called after this this unless the IProtonBuffer is reset via a position marker. This method can be useful when the caller intends to manually read the binary payload from the given IProtonBuffer.

Parameters
bufferThe buffer where the size should be read from
stateThe decoder state that provides support
Returns
the size of the map payload that is encoded in the given buffer

Implements Apache.Qpid.Proton.Codec.Decoders.Primitives.IMapTypeDecoder.

Implemented in Apache.Qpid.Proton.Codec.Decoders.Primitives.Map8TypeDecoder, and Apache.Qpid.Proton.Codec.Decoders.Primitives.Map32TypeDecoder.

◆ ReadSize() [2/2]

abstract int Apache.Qpid.Proton.Codec.Decoders.Primitives.AbstractMapTypeDecoder.ReadSize ( Stream  stream,
IStreamDecoderState  state 
)
pure virtual

Reads the encoded size value for the encoded map payload and returns it. The read is destructive and the type decoder read methods cannot be called after this this unless the Stream is reset via a position marker. This method can be useful when the caller intends to manually read the binary payload from the given stream.

Parameters
streamThe stream where the size should be read from
stateThe decoder state that provides support
Returns
the size of the map payload that is encoded in the given stream

Implements Apache.Qpid.Proton.Codec.Decoders.Primitives.IMapTypeDecoder.

Implemented in Apache.Qpid.Proton.Codec.Decoders.Primitives.Map8TypeDecoder, and Apache.Qpid.Proton.Codec.Decoders.Primitives.Map32TypeDecoder.

◆ ReadValue() [1/2]

override object Apache.Qpid.Proton.Codec.Decoders.Primitives.AbstractMapTypeDecoder.ReadValue ( IProtonBuffer  buffer,
IDecoderState  state 
)
inlinevirtual

Reads this decoders managed type from the given buffer and returns it.

Parameters
bufferThe buffer where the encoded bytes can be read from
stateThe decoder state that can be used during decode
Returns
The decoded value from the byte stream

Implements Apache.Qpid.Proton.Codec.Decoders.AbstractPrimitiveTypeDecoder.

◆ ReadValue() [2/2]

override object Apache.Qpid.Proton.Codec.Decoders.Primitives.AbstractMapTypeDecoder.ReadValue ( Stream  stream,
IStreamDecoderState  state 
)
inlinevirtual

Reads this decoders managed type from the given buffer and returns it.

Parameters
streamThe stream where the encoded bytes can be read from
stateThe decoder state that can be used during decode
Returns
The decoded value from the byte stream

Implements Apache.Qpid.Proton.Codec.Decoders.AbstractPrimitiveTypeDecoder.

◆ SkipValue() [1/2]

override void Apache.Qpid.Proton.Codec.Decoders.Primitives.AbstractMapTypeDecoder.SkipValue ( IProtonBuffer  buffer,
IDecoderState  state 
)
inlinevirtual

Skips the value that this decoder is handling by skipping the encoded bytes in the provided buffer instance.

Parameters
bufferThe buffer where the encoded bytes can be read from
stateThe decoder state that can be used during decode

Implements Apache.Qpid.Proton.Codec.Decoders.AbstractPrimitiveTypeDecoder.

◆ SkipValue() [2/2]

override void Apache.Qpid.Proton.Codec.Decoders.Primitives.AbstractMapTypeDecoder.SkipValue ( Stream  stream,
IStreamDecoderState  state 
)
inlinevirtual

Skips the value that this decoder is handling by skipping the encoded bytes in the provided buffer instance.

Parameters
streamThe stream where the encoded bytes can be read from
stateThe decoder state that can be used during decode

Implements Apache.Qpid.Proton.Codec.Decoders.AbstractPrimitiveTypeDecoder.


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