Proton DotNet
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Properties | List of all members
Apache.Qpid.Proton.Client.IMessage< T > Interface Template Reference

A single AMQP Message instance used by senders and receivers to provide a high level abstraction around an AMQP message. More...

Inheritance diagram for Apache.Qpid.Proton.Client.IMessage< T >:
Apache.Qpid.Proton.Client.IAdvancedMessage< T > Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >

Public Member Functions

IAdvancedMessage< T > ToAdvancedMessage ()
 Safely converts this message to an advanced message instance which allows lower level access to AMQP message constructs.
 
bool HasAnnotation (string key)
 Query the message to determine if the message carries the given annotation keyed value.
 
object GetAnnotation (string key)
 Returns the requested message annotation value from this message if it exists or returns null otherwise.
 
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.
 
object RemoveAnnotation (string key)
 Removes the given annotation from the message if present and returns the value that was stored within.
 
IMessage< T > ForEachAnnotation (Action< string, object > consumer)
 Efficient walk of all the current message annotations contained in this message.
 
bool HasProperty (string key)
 Query the message to determine if the message carries the given property.
 
object GetProperty (string key)
 Returns the requested message property value from this message if it exists or returns null otherwise.
 
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.
 
object RemoveProperty (string key)
 Removes the given property from the message if present and returns the value that was stored within.
 
IMessage< T > ForEachProperty (Action< string, object > consumer)
 Efficient walk of all the current message properties contained in this message.
 
bool HasFooter (string key)
 Query the message to determine if the message carries the given footer entry.
 
object GetFooter (string key)
 Returns the requested message footer value from this message if it exists or returns null otherwise.
 
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.
 
object RemoveFooter (string key)
 Removes the given property from the message if present and returns the value that was stored within.
 
IMessage< T > ForEachFooter (Action< string, object > consumer)
 Efficient walk of all the current message footers contained in this message.
 

Static Public Member Functions

static IMessage< T > Create ()
 Create and return an IMessage that will carry no body section unless one is assigned by the caller.
 
static IMessage< T > Create (T value)
 Create and return an IMessage that will carry the body section provided.
 
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.
 
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.
 
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.
 

Properties

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).
 
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).
 
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).
 
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).
 
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).
 
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.
 
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.
 
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.
 
string Subject [get, set]
 The Subject field is a common field for summary information about the message content and purpose.
 
string ReplyTo [get, set]
 The reply to field identifies a node that is the intended destination for responses to this message.
 
object CorrelationId [get, set]
 This is a client-specific id that can be used to mark or identify messages between clients.
 
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"'.
 
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.
 
ulong AbsoluteExpiryTime [get, set]
 An absolute time when this message is considered to be expired.
 
ulong CreationTime [get, set]
 An absolute time when this message was created.
 
string GroupId [get, set]
 Identifies the group the message belongs to.
 
uint GroupSequence [get, set]
 The relative position of this message within its group.
 
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.
 
bool HasAnnotations [get]
 Checks if the message carries any annotations.
 
bool HasProperties [get]
 Checks if the message carries any message properties.
 
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.
 
bool HasFooters [get]
 Checks if the message carries any footers.
 

Detailed Description

A single AMQP Message instance used by senders and receivers to provide a high level abstraction around an AMQP message.

Template Parameters
TThe type that comprises the message body</typename>

Member Function Documentation

◆ Create() [1/4]

static IMessage< T > Apache.Qpid.Proton.Client.IMessage< T >.Create ( )
inlinestatic

Create and return an IMessage that will carry no body section unless one is assigned by the caller.

Template Parameters
EThe type that the message body will be
Returns
a new message instance with an empty body.

Implemented in Apache.Qpid.Proton.Client.IAdvancedMessage< T >, and Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ Create() [2/4]

static IMessage< byte[]> Apache.Qpid.Proton.Client.IMessage< T >.Create ( byte[]  value)
inlinestatic

Create and return an IMessage that will carry the body section provided as an AMQP Data section that carries the provided bytes.

Parameters
valueThe byte array to wrap in the AMQP message body
Returns
a new message instance with the provided body.

◆ Create() [3/4]

static IMessage< IList > Apache.Qpid.Proton.Client.IMessage< T >.Create ( IList  value)
inlinestatic

Create and return an IMessage that will carry the body section provided as an AMQP Sequence section that carries the provided list entries.

Parameters
valueThe list to wrap in the AMQP message body
Returns
a new message instance with the provided body.

◆ Create() [4/4]

static IMessage< T > Apache.Qpid.Proton.Client.IMessage< T >.Create ( value)
inlinestatic

Create and return an IMessage that will carry the body section provided.

Returns
a new message instance with the provided body.

◆ Create< K, V >()

static IMessage< IDictionary > Apache.Qpid.Proton.Client.IMessage< T >.Create< K, V > ( IDictionary  value)
inlinestatic

Create and return an IMessage that will carry the body section provided as an AMQP Value section that carries the provided map entries.

Parameters
valueThe map to wrap in the AMQP message body
Returns
a new message instance with the provided body.

◆ ForEachAnnotation()

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

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

Parameters
consumerFunction that will be called for each annotation

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ ForEachFooter()

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

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

Parameters
consumer

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ ForEachProperty()

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

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

Parameters
consumer

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ GetAnnotation()

object Apache.Qpid.Proton.Client.IMessage< T >.GetAnnotation ( string  key)

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

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ GetFooter()

object Apache.Qpid.Proton.Client.IMessage< T >.GetFooter ( string  key)

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

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ GetProperty()

object Apache.Qpid.Proton.Client.IMessage< T >.GetProperty ( string  key)

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

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ HasAnnotation()

bool Apache.Qpid.Proton.Client.IMessage< T >.HasAnnotation ( string  key)

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

Returns
true if the message instance carries the annotation

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ HasFooter()

bool Apache.Qpid.Proton.Client.IMessage< T >.HasFooter ( string  key)

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

Returns
true if the message instance carries the footer entry

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ HasProperty()

bool Apache.Qpid.Proton.Client.IMessage< T >.HasProperty ( string  key)

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

Returns
true if the message instance carries the property

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ RemoveAnnotation()

object Apache.Qpid.Proton.Client.IMessage< T >.RemoveAnnotation ( string  key)

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

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ RemoveFooter()

object Apache.Qpid.Proton.Client.IMessage< T >.RemoveFooter ( string  key)

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

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ RemoveProperty()

object Apache.Qpid.Proton.Client.IMessage< T >.RemoveProperty ( string  key)

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

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ SetAnnotation()

IMessage< T > Apache.Qpid.Proton.Client.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.

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

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ SetFooter()

IMessage< T > Apache.Qpid.Proton.Client.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.

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

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ SetProperty()

IMessage< T > Apache.Qpid.Proton.Client.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.

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

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ ToAdvancedMessage()

IAdvancedMessage< T > Apache.Qpid.Proton.Client.IMessage< T >.ToAdvancedMessage ( )
inline

Safely converts this message to an advanced message instance which allows lower level access to AMQP message constructs.

The default implementation first checks if the current instance is already of the correct type before performing a brute force conversion of the current message to the client's own internal IAdvancedMessage implementation. Users should override this method if the internal conversion implementation is insufficient to obtain the proper message structure to encode a meaningful 'on the wire' encoding of their custom implementation.

Returns
An advanced message view of the original message
Exceptions
ClientExceptionIf an error occurs during the conversion

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

Property Documentation

◆ AbsoluteExpiryTime

ulong Apache.Qpid.Proton.Client.IMessage< T >.AbsoluteExpiryTime
getset

An absolute time when this message is considered to be expired.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ Body

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.

Returns
The message body
Exceptions
ClientExceptionIf the message body cannot be read or written

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ ContentEncoding

string Apache.Qpid.Proton.Client.IMessage< T >.ContentEncoding
getset

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.

Content-encodings are to be interpreted as per section 3.5 of RFC 2616 [RFC2616]. Valid content-encodings are registered at IANA [IANAHTTPPARAMS].

The content-encoding MUST NOT be set when the application-data section is other than data. The binary representation of all other application-data section types is defined completely in terms of the AMQP type system.

Implementations MUST NOT use the identity encoding. Instead, implementations SHOULD NOT set this property. Implementations SHOULD NOT use the compress encoding, except as to remain compatible with messages originally sent with other protocols, e.g. HTTP or SMTP.

Implementations SHOULD NOT specify multiple content-encoding values except as to be compatible with messages originally sent with other protocols, e.g. HTTP or SMTP.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ ContentType

string Apache.Qpid.Proton.Client.IMessage< T >.ContentType
getset

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"'.

When using an application-data section with a section code other than data, content-type SHOULD NOT be set.

For clarity, as per section 7.2.1 of RFC-2616, where the content type is unknown the content-type SHOULD NOT be set. This allows the recipient the opportunity to determine the actual type. Where the section is known to be truly opaque binary data, the content-type SHOULD be set to application/octet-stream.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ CorrelationId

object Apache.Qpid.Proton.Client.IMessage< T >.CorrelationId
getset

This is a client-specific id that can be used to mark or identify messages between clients.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ CreationTime

ulong Apache.Qpid.Proton.Client.IMessage< T >.CreationTime
getset

An absolute time when this message was created.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ DeliveryCount

uint Apache.Qpid.Proton.Client.IMessage< T >.DeliveryCount
getset

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).

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ Durable

bool Apache.Qpid.Proton.Client.IMessage< T >.Durable
getset

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).

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ FirstAcquirer

bool Apache.Qpid.Proton.Client.IMessage< T >.FirstAcquirer
getset

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).

If this value is true, then this message has not been acquired by any other link. If this value is false, then this message MAY have previously been acquired by another link or links.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ GroupId

string Apache.Qpid.Proton.Client.IMessage< T >.GroupId
getset

Identifies the group the message belongs to.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ GroupSequence

uint Apache.Qpid.Proton.Client.IMessage< T >.GroupSequence
getset

The relative position of this message within its group.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ HasAnnotations

bool Apache.Qpid.Proton.Client.IMessage< T >.HasAnnotations
get

Checks if the message carries any annotations.

Returns
true if the message instance carries any annotations

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ HasFooters

bool Apache.Qpid.Proton.Client.IMessage< T >.HasFooters
get

Checks if the message carries any footers.

Returns
true if the message instance carries any footers

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ HasProperties

bool Apache.Qpid.Proton.Client.IMessage< T >.HasProperties
get

Checks if the message carries any message properties.

Returns
true if the message instance carries any properties

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ MessageId

object Apache.Qpid.Proton.Client.IMessage< T >.MessageId
getset

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.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ Priority

byte Apache.Qpid.Proton.Client.IMessage< T >.Priority
getset

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).

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ ReplyTo

string Apache.Qpid.Proton.Client.IMessage< T >.ReplyTo
getset

The reply to field identifies a node that is the intended destination for responses to this message.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ ReplyToGroupId

string Apache.Qpid.Proton.Client.IMessage< T >.ReplyToGroupId
getset

This is a client-specific id that is used so that client can send replies to this message to a specific group.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ Subject

string Apache.Qpid.Proton.Client.IMessage< T >.Subject
getset

The Subject field is a common field for summary information about the message content and purpose.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ TimeToLive

uint Apache.Qpid.Proton.Client.IMessage< T >.TimeToLive
getset

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).

The time to live duration in milliseconds for which the message is to be considered "live". If this is set then a message expiration time will be computed based on the time of arrival at an intermediary. Messages that live longer than their expiration time will be discarded (or dead lettered). When a message is transmitted by an intermediary that was received with a time to live, the transmitted message's header SHOULD contain a time to live that is computed as the difference between the current time and the formerly computed message expiration time, i.e., the reduced time to live, so that messages will eventually die if they end up in a delivery loop.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ To

string Apache.Qpid.Proton.Client.IMessage< T >.To
getset

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.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.

◆ UserId

byte [] Apache.Qpid.Proton.Client.IMessage< T >.UserId
getset

The identity of the user responsible for producing the message. The client sets this value, and it MAY be authenticated by intermediaries.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientMessage< T >.


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