Proton DotNet
All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
Public Member Functions | Static Public Member Functions | Properties | List of all members
Apache.Qpid.Proton.Client.Implementation.ClientMessage< T > Class Template Reference
Inheritance diagram for Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >:
Apache.Qpid.Proton.Client.IAdvancedMessage< T > Apache.Qpid.Proton.Client.IMessage< T >

Public Member Functions

IAdvancedMessage< T > ToAdvancedMessage ()
 Returns this message as an advanced message instance. More...
 
IProtonBuffer Encode (IDictionary< string, object > deliveryAnnotations)
 Encodes the advanced message for transmission by the client. The provided delivery annotations can be included or augmented by the advanced implementation based on the target message format. The implementation is responsible for ensuring that the delivery annotations are treated correctly encoded into the correct location in the message. More...
 
bool HasAnnotation (string key)
 Query the message to determine if the message carries the given annotation keyed value. More...
 
object GetAnnotation (string key)
 Returns the requested message annotation value from this message if it exists or returns null otherwise. More...
 
IMessage< T > SetAnnotation (string key, object value)
 Add the annotation to he set of message annotations or update the value stored with the given annotation key. More...
 
object RemoveAnnotation (string key)
 Removes the given annotation from the message if present and returns the value that was stored within. More...
 
IMessage< T > ForEachAnnotation (Action< string, object > consumer)
 Efficient walk of all the current message annotations contained in this message. More...
 
bool HasProperty (string key)
 Query the message to determine if the message carries the given property. More...
 
object GetProperty (string key)
 Returns the requested message property value from this message if it exists or returns null otherwise. More...
 
IMessage< T > SetProperty (string key, object value)
 Add the property to he set of message properties or update the value stored with the given mapping. More...
 
object RemoveProperty (string key)
 Removes the given property from the message if present and returns the value that was stored within. More...
 
IMessage< T > ForEachProperty (Action< string, object > consumer)
 Efficient walk of all the current message properties contained in this message. More...
 
bool HasFooter (string key)
 Query the message to determine if the message carries the given footer entry. More...
 
object GetFooter (string key)
 Returns the requested message footer value from this message if it exists or returns null otherwise. More...
 
IMessage< T > SetFooter (string key, object value)
 Add the footer to he set of message footers or update the value stored with the given mapping. More...
 
object RemoveFooter (string key)
 Removes the given property from the message if present and returns the value that was stored within. More...
 
IMessage< T > ForEachFooter (Action< string, object > consumer)
 Efficient walk of all the current message footers contained in this message. More...
 
IAdvancedMessage< T > AddBodySection (ISection section)
 Adds the given section to the internal collection of sections that will be sent to the remote peer when this message is encoded. If a previous section was added by a call to the set body method it should be retained as the first element of the running list of body sections contained in this message. More...
 
IEnumerable< ISectionGetBodySections ()
 Create and return an unmodifiable read-only view that contains the section instances currently assigned to this message. More...
 
IAdvancedMessage< T > SetBodySections (IEnumerable< ISection > sections)
 Sets the body section instances to use when encoding this message. The value set replaces any existing sections assigned to this message through the add body sections API or the singular body set method. Calling the set method with a null or empty enumerable is equivalent to calling the clear body sections method. The values from the passed enumerable are copied and changes to it following calls to this method are not reflected in the collection contained in this message. More...
 
IAdvancedMessage< T > ClearBodySections ()
 Clears all currently set body sections from this message instance. More...
 
IAdvancedMessage< T > ForEachBodySection (Action< ISection > consumer)
 Efficient enumeration over all currently assigned body sections in this message. More...
 

Static Public Member Functions

static ClientMessage< T > Create ()
 Creates a new advanced message instance using the Proton implementation. More...
 
static ClientMessage< T > Create (ISection body)
 
static ClientMessage< T > CreateAdvancedMessage ()
 
- Static Public Member Functions inherited from Apache.Qpid.Proton.Client.IMessage< T >
static IMessage< T > Create (T value)
 Create and return an IMessage that will carry the body section provided More...
 
static IMessage< byte[]> Create (byte[] value)
 Create and return an IMessage that will carry the body section provided as an AMQP Data section that carries the provided bytes. More...
 
static IMessage< IList > Create (IList value)
 Create and return an IMessage that will carry the body section provided as an AMQP Sequence section that carries the provided list entries. More...
 
static IMessage< IDictionary > Create< K, V > (IDictionary value)
 Create and return an IMessage that will carry the body section provided as an AMQP Value section that carries the provided map entries. More...
 

Properties

uint MessageFormat [get, set]
 
bool??? Durable [get, set]
 
byte??? Priority [get, set]
 
uint??? TimeToLive [get, set]
 
bool??? FirstAcquirer [get, set]
 
uint??? DeliveryCount [get, set]
 
object? MessageId [get, set]
 
byte[]? UserId [get, set]
 
string? To [get, set]
 
string? Subject [get, set]
 
string? ReplyTo [get, set]
 
object? CorrelationId [get, set]
 
string? ContentType [get, set]
 
string? ContentEncoding [get, set]
 
ulong??? AbsoluteExpiryTime [get, set]
 
ulong??? CreationTime [get, set]
 
string? GroupId [get, set]
 
uint??? GroupSequence [get, set]
 
string? ReplyToGroupId [get, set]
 
bool HasAnnotations [get]
 
bool HasProperties [get]
 
bool HasFooters [get]
 
Header Header [get, set]
 
Properties Properties [get, set]
 
MessageAnnotations Annotations [get, set]
 
ApplicationProperties ApplicationProperties [get, set]
 
Footer Footer [get, set]
 
Body [get, set]
 
- Properties inherited from Apache.Qpid.Proton.Client.IAdvancedMessage< T >
Header Header [get, set]
 Provides access to the AMQP Header instance that is carried in the message. More...
 
Properties Properties [get, set]
 Provides access to the AMQP Properties instance that is carried in the message. More...
 
MessageAnnotations Annotations [get, set]
 Provides access to the AMQP MessageAnnotations instance that is carried in the message. More...
 
ApplicationProperties ApplicationProperties [get, set]
 Provides access to the AMQP ApplicationProperties instance that is carried in the message. More...
 
Footer Footer [get, set]
 Provides access to the AMQP Footer instance that is carried in the message. More...
 
uint MessageFormat [get, set]
 Access the message format value present in this message. The exact structure of a message, together with its encoding, is defined by the message format (default is the AMQP defined message format zero. More...
 
- Properties inherited from Apache.Qpid.Proton.Client.IMessage< T >
bool Durable [get, set]
 For a message being sent this gets and sets the durability flag on the message. For a received message this gets or overwrites the durability flag set by the original sender (unless already locally updated). More...
 
byte Priority [get, set]
 For a message being sent this gets and sets the message priority on the message. For a received message this gets or overwrites the priority value set by the original sender (unless already locally updated). More...
 
uint TimeToLive [get, set]
 For a message being sent this gets and sets the message time to live on the message. For a received message this gets or overwrites the time to live value set by the original sender (unless already locally updated). More...
 
bool FirstAcquirer [get, set]
 For a message being sent this gets and sets the first acquirer flag on the message. For a received message this gets or overwrites the first acquirer flag set by the original sender (unless already locally updated). More...
 
uint DeliveryCount [get, set]
 For a message being sent this gets and sets the message delivery count on the message. For a received message this gets or overwrites the delivery count set by the original sender (unless already locally updated). More...
 
object MessageId [get, set]
 The message Id, if set, uniquely identifies a message within the message system. The message producer is usually responsible for setting the message-id in such a way that it is assured to be globally unique. A remote peer MAY discard a message as a duplicate if the value of the message-id matches that of a previously received message sent to the same node. More...
 
byte[] UserId [get, set]
 The identity of the user responsible for producing the message. The client sets this value, and it MAY be authenticated by intermediaries. More...
 
string To [get, set]
 The to field identifies the node that is the intended destination of the message. On any given transfer this might not be the node at the receiving end of the link. More...
 
string Subject [get, set]
 The Subject field is a common field for summary information about the message content and purpose. More...
 
string ReplyTo [get, set]
 The reply to field identifies a node that is the intended destination for responses to this message. More...
 
object CorrelationId [get, set]
 This is a client-specific id that can be used to mark or identify messages between clients. More...
 
string ContentType [get, set]
 The RFC-2046 MIME type for the message's application-data section (body). As per RFC-2046 this can contain a charset parameter defining the character encoding used: e.g., 'text/plain; charset="utf-8"' More...
 
string ContentEncoding [get, set]
 The content-encoding property is used as a modifier to the content-type. When present, its value indicates what additional content encodings have been applied to the application-data, and thus what decoding mechanisms need to be applied in order to obtain the media-type referenced by the content-type header field. Content-encoding is primarily used to allow a document to be compressed without losing the identity of its underlying content type. More...
 
ulong AbsoluteExpiryTime [get, set]
 An absolute time when this message is considered to be expired. More...
 
ulong CreationTime [get, set]
 An absolute time when this message was created. More...
 
string GroupId [get, set]
 Identifies the group the message belongs to. More...
 
uint GroupSequence [get, set]
 The relative position of this message within its group. More...
 
string ReplyToGroupId [get, set]
 This is a client-specific id that is used so that client can send replies to this message to a specific group. More...
 
bool HasAnnotations [get]
 Checks if the message carries any annotations. More...
 
bool HasProperties [get]
 Checks if the message carries any message properties. More...
 
Body [get, set]
 Access the body of this message. Depending on the current state of the message an exception might be thrown indicating that the body is not readable or is not writable. More...
 
bool HasFooters [get]
 Checks if the message carries any footers. More...
 

Member Function Documentation

◆ AddBodySection()

Adds the given section to the internal collection of sections that will be sent to the remote peer when this message is encoded. If a previous section was added by a call to the set body method it should be retained as the first element of the running list of body sections contained in this message.

The implementation should make an attempt to validate that sections added are valid for the message format that is assigned when they are added.

Parameters
sectionThe section to add to the collection of sections in this message
Returns
This advanced message instance.

Implements Apache.Qpid.Proton.Client.IAdvancedMessage< T >.

◆ ClearBodySections()

Clears all currently set body sections from this message instance.

Returns
This advanced message instance.

Implements Apache.Qpid.Proton.Client.IAdvancedMessage< T >.

◆ Create()

Creates a new advanced message instance using the Proton implementation.

Returns
A new advanced message instance.

Implements Apache.Qpid.Proton.Client.IAdvancedMessage< T >.

◆ Encode()

IProtonBuffer Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.Encode ( IDictionary< string, object >  deliveryAnnotations)
inline

Encodes the advanced message for transmission by the client. The provided delivery annotations can be included or augmented by the advanced implementation based on the target message format. The implementation is responsible for ensuring that the delivery annotations are treated correctly encoded into the correct location in the message.

Parameters
deliveryAnnotationsOptions delivery annotations to encode with the message
Returns
The encoded message bytes in a proton buffer instance

Implements Apache.Qpid.Proton.Client.IAdvancedMessage< T >.

◆ ForEachAnnotation()

IMessage<T> Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.ForEachAnnotation ( Action< string, object >  consumer)
inline

Efficient walk of all the current message annotations contained in this message.

Parameters
consumerFunction that will be called for each annotation

Implements Apache.Qpid.Proton.Client.IMessage< T >.

◆ ForEachBodySection()

IAdvancedMessage<T> Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.ForEachBodySection ( Action< ISection consumer)
inline

Efficient enumeration over all currently assigned body sections in this message.

Parameters
consumerFunction to invoke for each section in the message
Returns
This advanced message instance.

Implements Apache.Qpid.Proton.Client.IAdvancedMessage< T >.

◆ ForEachFooter()

IMessage<T> Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.ForEachFooter ( Action< string, object >  consumer)
inline

Efficient walk of all the current message footers contained in this message.

Parameters
consumer

Implements Apache.Qpid.Proton.Client.IMessage< T >.

◆ ForEachProperty()

IMessage<T> Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.ForEachProperty ( Action< string, object >  consumer)
inline

Efficient walk of all the current message properties contained in this message.

Parameters
consumer

Implements Apache.Qpid.Proton.Client.IMessage< T >.

◆ GetAnnotation()

object Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.GetAnnotation ( string  key)
inline

Returns the requested message annotation value from this message if it exists or returns null otherwise.

Parameters
keyThe message annotation key
Returns
The value that is stored in the message annotation mapping

Implements Apache.Qpid.Proton.Client.IMessage< T >.

◆ GetBodySections()

IEnumerable<ISection> Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.GetBodySections ( )
inline

Create and return an unmodifiable read-only view that contains the section instances currently assigned to this message.

Returns
a read-only view of the sections in this message's body

Implements Apache.Qpid.Proton.Client.IAdvancedMessage< T >.

◆ GetFooter()

object Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.GetFooter ( string  key)
inline

Returns the requested message footer value from this message if it exists or returns null otherwise.

Parameters
keyThe message footer key
Returns
The value that is mapped to the given key

Implements Apache.Qpid.Proton.Client.IMessage< T >.

◆ GetProperty()

object Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.GetProperty ( string  key)
inline

Returns the requested message property value from this message if it exists or returns null otherwise.

Parameters
keyThe message property key
Returns
The value that is mapped to the given key

Implements Apache.Qpid.Proton.Client.IMessage< T >.

◆ HasAnnotation()

bool Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.HasAnnotation ( string  key)
inline

Query the message to determine if the message carries the given annotation keyed value.

Returns
true if the message instance carries the annotation

Implements Apache.Qpid.Proton.Client.IMessage< T >.

◆ HasFooter()

bool Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.HasFooter ( string  key)
inline

Query the message to determine if the message carries the given footer entry.

Returns
true if the message instance carries the footer entry

Implements Apache.Qpid.Proton.Client.IMessage< T >.

◆ HasProperty()

bool Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.HasProperty ( string  key)
inline

Query the message to determine if the message carries the given property.

Returns
true if the message instance carries the property

Implements Apache.Qpid.Proton.Client.IMessage< T >.

◆ RemoveAnnotation()

object Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.RemoveAnnotation ( string  key)
inline

Removes the given annotation from the message if present and returns the value that was stored within.

Parameters
keyThe annotation key whose value should be removed.
Returns
The annotation value removed or null if not present

Implements Apache.Qpid.Proton.Client.IMessage< T >.

◆ RemoveFooter()

object Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.RemoveFooter ( string  key)
inline

Removes the given property from the message if present and returns the value that was stored within.

Parameters
keyThe property key which is to be removed
Returns
The property value removed or null if not present

Implements Apache.Qpid.Proton.Client.IMessage< T >.

◆ RemoveProperty()

object Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.RemoveProperty ( string  key)
inline

Removes the given property from the message if present and returns the value that was stored within.

Parameters
keyThe property key which is to be removed
Returns
The property value removed or null if not present

Implements Apache.Qpid.Proton.Client.IMessage< T >.

◆ SetAnnotation()

IMessage<T> Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.SetAnnotation ( string  key,
object  value 
)
inline

Add the annotation to he set of message annotations or update the value stored with the given annotation key.

Parameters
keyThe whose value is being added or updated
valueThe value to store with the given key
Returns
This message instance

Implements Apache.Qpid.Proton.Client.IMessage< T >.

◆ SetBodySections()

IAdvancedMessage<T> Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.SetBodySections ( IEnumerable< ISection section)
inline

Sets the body section instances to use when encoding this message. The value set replaces any existing sections assigned to this message through the add body sections API or the singular body set method. Calling the set method with a null or empty enumerable is equivalent to calling the clear body sections method. The values from the passed enumerable are copied and changes to it following calls to this method are not reflected in the collection contained in this message.

Parameters
sectionsThe collection of body sections to assign to this message
Returns
This advanced message instance.

Implements Apache.Qpid.Proton.Client.IAdvancedMessage< T >.

◆ SetFooter()

IMessage<T> Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.SetFooter ( string  key,
object  value 
)
inline

Add the footer to he set of message footers or update the value stored with the given mapping.

Parameters
keyThe whose value is being added or updated
valueThe value to store with the given key
Returns
This message object instance

Implements Apache.Qpid.Proton.Client.IMessage< T >.

◆ SetProperty()

IMessage<T> Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.SetProperty ( string  key,
object  value 
)
inline

Add the property to he set of message properties or update the value stored with the given mapping.

Parameters
keyThe whose value is being added or updated
valueThe value to store with the given key
Returns
This message object instance

Implements Apache.Qpid.Proton.Client.IMessage< T >.

◆ ToAdvancedMessage()

Returns this message as an advanced message instance.

Returns
This message instance as an advanced message interface

Implements Apache.Qpid.Proton.Client.IMessage< T >.


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