YAMI4 for .NET 1.3.0

Inspirel.YAMI.IncomingMessage Class Reference

Incoming message handler. More...

List of all members.

Public Member Functions

virtual void Reply (YAMISerializable replyBody)
 Send back the reply with default (lowest) priority.
virtual void Reply (YAMISerializable replyBody, int priority)
 Send back the reply with given priority.
virtual void Reject (string reason)
 Send back the rejection (exception) notification with default (lowest) priority.
virtual void Reject (string reason, int priority)
 Send back the rejection (exception) notification with given priority.

Properties

virtual string Source [get]
 Gets the target name of the message sender (the message source).
virtual string ObjectName [get]
 Gets the destination object name.
virtual string MessageName [get]
 Gets the message name.
virtual Parameters Parameters [get]
 Gets the message parameters (message body).
virtual byte[] RawContent [get]
 Get the message raw (binary) content.

Detailed Description

Incoming message handler.

The handler allowing to inspect the details of the incoming message and sent back replies or rejection notifications.

The user code interacts with objects of this type mainly in callbacks that are provided during object registration and that are later called back when the incoming message arrives. The handler objects can be stored aside for further processing even after the callback returns, but should no be used after the agent itself is closed.

Note: The objects of this class are not supposed to be used from multiple threads.

See also:
Agent.RegisterObject, IncomingMessageHandler, IncomingMessageArgs

Member Function Documentation

virtual void Inspirel.YAMI.IncomingMessage.Reject ( string  reason) [virtual]

Send back the rejection (exception) notification with default (lowest) priority.

Parameters:
reasonarbitrary text that will be visible by the original sender as a reason for rejection
Exceptions:
YAMIIOExceptionIf the reply channel cannot be established
BadStateExceptionIf the rejection already sent
virtual void Inspirel.YAMI.IncomingMessage.Reject ( string  reason,
int  priority 
) [virtual]

Send back the rejection (exception) notification with given priority.

Parameters:
reasonarbitrary text that will be visible by the original sender as a reason for rejection
prioritythe priority of rejection
Exceptions:
YAMIIOExceptionIf the reply channel cannot be established
BadStateExceptionIf the rejection already sent
virtual void Inspirel.YAMI.IncomingMessage.Reply ( YAMISerializable  replyBody) [virtual]

Send back the reply with default (lowest) priority.

Parameters:
replyBodythe content of the reply (it can be null, in which case the empty object is sent)
Exceptions:
YAMIIOExceptionif the reply channel cannot be established
BadStateExceptionIf the reply was already sent.
virtual void Inspirel.YAMI.IncomingMessage.Reply ( YAMISerializable  replyBody,
int  priority 
) [virtual]

Send back the reply with given priority.

Parameters:
replyBodythe content of the reply (it can be null, in which case the empty object is sent)
prioritythe priority of reply
Exceptions:
YAMIIOExceptionIf the reply channel cannot be established
BadStateExceptionIf the reply was already sent.

Property Documentation

virtual string Inspirel.YAMI.IncomingMessage.MessageName [get]

Gets the message name.

Message name

virtual string Inspirel.YAMI.IncomingMessage.ObjectName [get]

Gets the destination object name.

Destination object name

virtual Parameters Inspirel.YAMI.IncomingMessage.Parameters [get]

Gets the message parameters (message body).

Message parameters

Exceptions:
BadStateExceptionThrown if incoming message don't have body
virtual byte [] Inspirel.YAMI.IncomingMessage.RawContent [get]

Get the message raw (binary) content.

Message raw content

Exceptions:
BadStateExceptionIf the agent was not configured for raw content delivery or message don't have body
virtual string Inspirel.YAMI.IncomingMessage.Source [get]

Gets the target name of the message sender (the message source).

Source name


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Enumerations Properties Events