flex.messaging.messages
Interface Message

All Superinterfaces:
Cloneable, Serializable
All Known Implementing Classes:
flex.messaging.messages.AbstractMessage, AsyncMessage, CommandMessage

public interface Message
extends Serializable, Cloneable

Messages are sent from Endpoints into the MessageBroker, which then sends them to a Service. The MessageBroker also sends Messages to Endpoints, and a Service may ask its Broker to send Messages to Endpoints.


Field Summary
static String DESTINATION_CLIENT_ID_HEADER
          The name for the destination client Id header, used to target a message back to the proper client when multiple clients share a channel.
static String ENDPOINT_HEADER
          The name for the endpoint header.
static String FLEX_CLIENT_ID_HEADER
          This header is used to transport the FlexClient Id value in messages sent clients to the server.
static String REMOTE_CREDENTIALS_HEADER
          The name for the header where remote credentials will be passed.
static String SYNC_HEADER
          Presence of param means that auto-sync is false for the destination
 
Method Summary
 Object clone()
          Returns a clone of the message.
 Object getBody()
          Returns the body of the message.
 Object getClientId()
          Returns the client id indicating the client that sent the message.
 String getDestination()
          Returns the destination that the message targets.
 Object getHeader(String name)
          Returns a header value corresponding to the passed header name.
 Map getHeaders()
          Returns the headers for the message.
 String getMessageId()
          Returns the unique message id.
 long getTimestamp()
          Returns the timestamp for the message.
 long getTimeToLive()
          Returns the time to live for the message.
 boolean headerExists(String name)
          Tests whether a header with the passed name exists.
 void setBody(Object value)
          Sets the body of the message.
 void setClientId(Object value)
          Sets the client id indicating the client that sent the message.
 void setDestination(String value)
          Sets the destination that the message targets.
 void setHeader(String name, Object value)
          Sets a header on the message.
 void setHeaders(Map value)
          Sets the headers for the message.
 void setMessageId(String value)
          Sets the unique message id.
 void setTimestamp(long value)
          Sets the timestamp for the message.
 void setTimeToLive(long value)
          Sets the time to live for the message.
 

Field Detail

FLEX_CLIENT_ID_HEADER

static final String FLEX_CLIENT_ID_HEADER
This header is used to transport the FlexClient Id value in messages sent clients to the server.

See Also:
Constant Field Values

DESTINATION_CLIENT_ID_HEADER

static final String DESTINATION_CLIENT_ID_HEADER
The name for the destination client Id header, used to target a message back to the proper client when multiple clients share a channel.

See Also:
Constant Field Values

ENDPOINT_HEADER

static final String ENDPOINT_HEADER
The name for the endpoint header.

See Also:
Constant Field Values

REMOTE_CREDENTIALS_HEADER

static final String REMOTE_CREDENTIALS_HEADER
The name for the header where remote credentials will be passed.

See Also:
Constant Field Values

SYNC_HEADER

static final String SYNC_HEADER
Presence of param means that auto-sync is false for the destination

See Also:
Constant Field Values
Method Detail

getClientId

Object getClientId()
Returns the client id indicating the client that sent the message.

Returns:
The client id indicating the client that sent the message.

setClientId

void setClientId(Object value)
Sets the client id indicating the client that sent the message.

Parameters:
value - The client id to set for the message.

getDestination

String getDestination()
Returns the destination that the message targets.

Returns:
The destination that the message targets.

setDestination

void setDestination(String value)
Sets the destination that the message targets.

Parameters:
value - The destination that the message targets.

getMessageId

String getMessageId()
Returns the unique message id.

Returns:
The unique message id.

setMessageId

void setMessageId(String value)
Sets the unique message id. The id value should be universally unique.

Parameters:
value - The unique message id.

getTimestamp

long getTimestamp()
Returns the timestamp for the message. Number of milleseconds since the epoch.

Returns:
The timestamp for the message.

setTimestamp

void setTimestamp(long value)
Sets the timestamp for the message. Number of milliseconds since the epoch.

Parameters:
value - The timestamp for the message.

getTimeToLive

long getTimeToLive()
Returns the time to live for the message. This is the number of milliseconds beyond the message timestamp that the message is considered valid and deliverable.

Returns:
The time to live for the message.

setTimeToLive

void setTimeToLive(long value)
Sets the time to live for the message. This is the number of milliseconds beyond the message timestamp that the message will be considered valid and deliverable.

Parameters:
value - The time to live for the message.

getBody

Object getBody()
Returns the body of the message.

Returns:
The body of the message.

setBody

void setBody(Object value)
Sets the body of the message.

Parameters:
value - The body of the message.

getHeaders

Map getHeaders()
Returns the headers for the message.

Returns:
The headers for the message.

setHeaders

void setHeaders(Map value)
Sets the headers for the message.

Parameters:
value - The headers to set on the message.

getHeader

Object getHeader(String name)
Returns a header value corresponding to the passed header name. If no header with this name exists, null is returned.

Parameters:
name - The header name to retrieve a value for.
Returns:
The header value.

setHeader

void setHeader(String name,
               Object value)
Sets a header on the message.

Parameters:
name - The name of the header to set.
value - The value for the header.

headerExists

boolean headerExists(String name)
Tests whether a header with the passed name exists.

Parameters:
name - The header to test for existence.
Returns:
true if the headers exists; otherwise false.

clone

Object clone()
Returns a clone of the message.

Returns:
A clone of the message.


Copyright © 2007 Adobe Systems Inc. All Rights Reserved.

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/lcdsjavadoc/flex/messaging/messages/Message.html