class AbstractMessage
package feathers.messaging.messages
implements IMessage
extended by AsyncMessage, HTTPRequestMessage, RemotingMessage
Abstract base class for all messages.
Messages have two customizable sections; headers and body.
The headers
property provides access to specialized meta
information for a specific message instance.
The headers
property is an associative array with the specific
header name as the key.
The body of a message contains the instance specific data that needs to be
delivered and processed by the remote destination.
The body
is an object and is the payload for a message.
Static variables
staticfinalread onlyDESTINATION_CLIENT_ID_HEADER:String = "DSDstClientId"
Messages pushed from the server may arrive in a batch, with messages in the batch potentially targeted to different Consumer instances. Each message will contain this header identifying the Consumer instance that will receive the message.
staticfinalread onlyENDPOINT_HEADER:String = "DSEndpoint"
Messages are tagged with the endpoint id for the Channel they are sent over. Channels set this value automatically when they send a message.
staticfinalread onlyFLEX_CLIENT_ID_HEADER:String = "DSId"
This header is used to transport the global FlexClient Id value in outbound messages once it has been assigned by the server.
staticfinalread onlyPRIORITY_HEADER:String = "DSPriority"
Messages sent by a MessageAgent can have a priority header with a 0-9 numerical value (0 being lowest) and the server can choose to use this numerical value to prioritize messages to clients.
staticfinalread onlyREMOTE_CREDENTIALS_CHARSET_HEADER:String = "DSRemoteCredentialsCharset"
Messages that need to set remote credentials for a destination may also need to report the character-set encoding that was used to create the credentials String using this header.
staticfinalread onlyREMOTE_CREDENTIALS_HEADER:String = "DSRemoteCredentials"
Messages that need to set remote credentials for a destination carry the Base64 encoded credentials in this header.
staticfinalread onlyREQUEST_TIMEOUT_HEADER:String = "DSRequestTimeout"
Messages sent with a defined request timeout use this header. The request timeout value is set on outbound messages by services or channels and the value controls how long the corresponding MessageResponder will wait for an acknowledgement, result or fault response for the message before timing out the request.
staticfinalread onlySTATUS_CODE_HEADER:String = "DSStatusCode"
A status code can provide context about the nature of a response message. For example, messages received from an HTTP based channel may need to report the HTTP response status code (if available).
Constructor
new()
Constructs an instance of an AbstractMessage with an empty body and header. This message type should not be instantiated or used directly.
Variables
body:Dynamic
The body of a message contains the specific data that needs to be delivered to the remote destination.
headers:Dynamic
The headers of a message are an associative array where the key is the header name and the value is the header value. This property provides access to the specialized meta information for the specific message instance. Core header names begin with a 'DS' prefix. Custom header names should start with a unique prefix to avoid name collisions.
timeToLive:Float
The time to live value of a message indicates how long the message
should be considered valid and deliverable.
This value works in conjunction with the timestamp
value.
Time to live is the number of milliseconds that this message remains
valid starting from the specified timestamp
value.
For example, if the timestamp
value is 04/05/05 1:30:45 PST
and the timeToLive
value is 5000, then this message will
expire at 04/05/05 1:30:50 PST.
Once a message expires it will not be delivered to any other clients.
timestamp:Float
Provides access to the time stamp for the message. A time stamp is the date and time that the message was sent. The time stamp is used for tracking the message through the system, ensuring quality of service levels and providing a mechanism for message expiration.
See also:
Methods
toString():String
Returns a string representation of the message.
Returns:
String representation of the message.