flex.messaging.messages
Class CommandMessage

java.lang.Object
  extended byflex.messaging.messages.AbstractMessage
      extended byflex.messaging.messages.AsyncMessage
          extended byflex.messaging.messages.CommandMessage
All Implemented Interfaces:
Cloneable, Message, Serializable

public class CommandMessage
extends AsyncMessage

A message that represents an infrastructure command passed between client and server. Subscribe/unsubscribe operations result in CommandMessage transmissions, as do polling operations.

See Also:
Serialized Form

Field Summary
static int CLIENT_PING_OPERATION
          This operation is used to test connectivity over the current channel to the remote endpoint.
static int CLIENT_SYNC_OPERATION
          This operation is used by a remote destination to sync missed or cached messages back to a client as a result of a client issued poll command.
static int CLUSTER_REQUEST_OPERATION
          This operation is used to request a list of failover endpoint URIs for the remote destination based on cluster membership.
static int LOGIN_OPERATION
          This operation is used to send credentials to the endpoint so that the user can be logged in over the current channel.
static int LOGOUT_OPERATION
          This operation is used to log the user out of the current channel, and will invalidate the server session if the channel is HTTP based.
static int POLL_OPERATION
          This operation is used to poll a remote destination for pending, undelivered messages.
static String SELECTOR_HEADER
          The name for the selector header in subscribe messages.
static int SESSION_INVALIDATE_OPERATION
          This operation is used to indicate that the client's session with a remote destination has timed out.
static String SESSION_INVALIDATED_HEADER
          The name for the header used internaly on the server to indicate that an unsubscribe message is due to a client session being invalidated.
static int SUBSCRIBE_OPERATION
          This operation is used to subscribe to a remote destination.
static int UNKNOWN_OPERATION
          This is the default operation for new CommandMessage instances.
static int UNSUBSCRIBE_OPERATION
          This operation is used to unsubscribe from a remote destination.
 
Fields inherited from class flex.messaging.messages.AsyncMessage
correlationId, SUBTOPIC_HEADER_NAME
 
Fields inherited from class flex.messaging.messages.AbstractMessage
body, clientId, destination, headers, messageId, timestamp, timeToLive
 
Fields inherited from interface flex.messaging.messages.Message
DESTINATION_CLIENT_ID_HEADER, ENDPOINT_HEADER, REMOTE_CREDENTIALS_HEADER
 
Constructor Summary
CommandMessage()
          Constructs a CommandMessage instance.
CommandMessage(int operation)
          Constructs a CommandMessage instance.
 
Method Summary
 String getMessageRefType()
          Returns the message reference type for the CommandMessage.
 int getOperation()
          Returns the operation for this CommandMessage.
 void setMessageRefType(String messageRefType)
          Sets the message reference type for the CommandMessage.
 void setOperation(int operation)
          Sets the operation for this CommandMessage.
 
Methods inherited from class flex.messaging.messages.AsyncMessage
getCorrelationId, setCorrelationId, toStringFields
 
Methods inherited from class flex.messaging.messages.AbstractMessage
bodyToString, clone, equals, getBody, getClientId, getDestination, getFieldSeparator, getHeader, getHeaders, getIndent, getMessageId, getTimestamp, getTimeToLive, headerExists, internalBodyToString, logCategory, setBody, setClientId, setDestination, setHeader, setHeaders, setMessageId, setTimestamp, setTimeToLive, toString, toString, toStringHeader
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SUBSCRIBE_OPERATION

public static final int SUBSCRIBE_OPERATION
This operation is used to subscribe to a remote destination.

See Also:
Constant Field Values

UNSUBSCRIBE_OPERATION

public static final int UNSUBSCRIBE_OPERATION
This operation is used to unsubscribe from a remote destination.

See Also:
Constant Field Values

POLL_OPERATION

public static final int POLL_OPERATION
This operation is used to poll a remote destination for pending, undelivered messages.

See Also:
Constant Field Values

CLIENT_SYNC_OPERATION

public static final int CLIENT_SYNC_OPERATION
This operation is used by a remote destination to sync missed or cached messages back to a client as a result of a client issued poll command.

See Also:
Constant Field Values

CLIENT_PING_OPERATION

public static final int CLIENT_PING_OPERATION
This operation is used to test connectivity over the current channel to the remote endpoint.

See Also:
Constant Field Values

CLUSTER_REQUEST_OPERATION

public static final int CLUSTER_REQUEST_OPERATION
This operation is used to request a list of failover endpoint URIs for the remote destination based on cluster membership.

See Also:
Constant Field Values

LOGIN_OPERATION

public static final int LOGIN_OPERATION
This operation is used to send credentials to the endpoint so that the user can be logged in over the current channel. The credentials need to be Base64 encoded and stored in the body of the message.

See Also:
Constant Field Values

LOGOUT_OPERATION

public static final int LOGOUT_OPERATION
This operation is used to log the user out of the current channel, and will invalidate the server session if the channel is HTTP based.

See Also:
Constant Field Values

SESSION_INVALIDATE_OPERATION

public static final int SESSION_INVALIDATE_OPERATION
This operation is used to indicate that the client's session with a remote destination has timed out.

See Also:
Constant Field Values

UNKNOWN_OPERATION

public static final int UNKNOWN_OPERATION
This is the default operation for new CommandMessage instances.

See Also:
Constant Field Values

SELECTOR_HEADER

public static final String SELECTOR_HEADER
The name for the selector header in subscribe messages.

See Also:
Constant Field Values

SESSION_INVALIDATED_HEADER

public static final String SESSION_INVALIDATED_HEADER
The name for the header used internaly on the server to indicate that an unsubscribe message is due to a client session being invalidated.

See Also:
Constant Field Values
Constructor Detail

CommandMessage

public CommandMessage()
Constructs a CommandMessage instance. The message id is set to a universally unique value, and the timestamp for the message is set to the current system timestamp. The operation is set to a default value of UNKNOWN_OPERATION.


CommandMessage

public CommandMessage(int operation)
Constructs a CommandMessage instance. The message id is set to a universally unique value, and the timestamp for the message is set to the current system timestamp.

Parameters:
operation - The operation for the CommandMessage; one of the operation constants.
Method Detail

getMessageRefType

public String getMessageRefType()
Returns the message reference type for the CommandMessage.

Returns:
The message reference type.

setMessageRefType

public void setMessageRefType(String messageRefType)
Sets the message reference type for the CommandMessage. This targets the message to a specific service destination based upon which service handles messages of this reference type.

Returns:
The message reference type.

getOperation

public int getOperation()
Returns the operation for this CommandMessage.

Returns:
The operation for this CommandMessage.

setOperation

public void setOperation(int operation)
Sets the operation for this CommandMessage.

Parameters:
operation - The operation for this CommandMessage.


Copyright © 2006 Adobe Systems Inc. All Rights Reserved. (Updated August 2, 2006)