flex.messaging.messages
Class CommandMessage

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

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 String ADD_SUBSCRIPTIONS
          Header used in a MULTI_SUBSCRIBE message to specify an Array of subtopic/selector pairs to add to the existing set of subscriptions.
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 String CREDENTIALS_CHARSET_HEADER
          Header to specify which character set encoding was used while encoding login credentials.
static int DISCONNECT_OPERATION
          This operation is used to indicate that a channel has disconnected.
static String LOG_CATEGORY
          Log category for CommandMessage.
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 String MESSAGING_VERSION
          Endpoints can imply what features they support by reporting the latest version of messaging they are capable of during the handshake of the initial ping CommandMessage.
static int MULTI_SUBSCRIBE_OPERATION
          This operation is used by the MultiTopicConsumer to subscribe/unsubscribe from multiple subtopics/selectors in the same message.
static String NEEDS_CONFIG_HEADER
          Header to indicate that the Channel needs the configuration from the server.
static String NO_OP_POLL_HEADER
          Header to suppress poll response processing.
static int POLL_OPERATION
          This operation is used to poll a remote destination for pending, undelivered messages.
static String POLL_WAIT_HEADER
          Header to drive an idle wait time before the next client poll request.
static String PRESERVE_DURABLE_HEADER
          Durable JMS subscriptions are preserved when an unsubscribe message has this parameter set to true in its header.
static String REMOVE_SUBSCRIPTIONS
          Like the above, but specifies the subtopic/selector array of to remove.
static String SELECTOR_HEADER
          The name for the selector header in subscribe messages.
static int SUBSCRIBE_OPERATION
          This operation is used to subscribe to a remote destination.
static int SUBSCRIPTION_INVALIDATE_OPERATION
          This operation is used to indicate that the client's subscription to a remote destination has been invalidated.
static String SUBSCRIPTION_INVALIDATED_HEADER
          The name for the header used internaly on the server to indicate that an unsubscribe message is due to a client subscription being invalidated.
static String SUBTOPIC_SEPARATOR
          The separator used in the add and remove subscription headers for multi subscribe messages.
static int TRIGGER_CONNECT_OPERATION
          This operation is used to trigger a client connect attempt.
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
SUBTOPIC_HEADER_NAME
 
Fields inherited from interface flex.messaging.messages.Message
DESTINATION_CLIENT_ID_HEADER, ENDPOINT_HEADER, FLEX_CLIENT_ID_HEADER, REMOTE_CREDENTIALS_CHARSET_HEADER, REMOTE_CREDENTIALS_HEADER, SYNC_HEADER
 
Constructor Summary
CommandMessage()
          Constructs a CommandMessage instance.
CommandMessage(int operation)
          Constructs a CommandMessage instance.
 
Method Summary
 int getOperation()
          Returns the operation for this CommandMessage.
 void setOperation(int operation)
          Sets the operation for this CommandMessage.
 
Methods inherited from class flex.messaging.messages.AsyncMessage
getCorrelationId, setCorrelationId
 
Methods inherited from class flex.messaging.messages.AbstractMessage
clone, equals, getBody, getClientId, getDestination, getHeader, getHeaders, getMessageId, getTimestamp, getTimeToLive, hashCode, headerExists, logCategory, setBody, setClientId, setDestination, setHeader, setHeaders, setMessageId, setTimestamp, setTimeToLive, toString, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

LOG_CATEGORY

public static final String LOG_CATEGORY
Log category for CommandMessage.

See Also:
Constant Field Values

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

SUBSCRIPTION_INVALIDATE_OPERATION

public static final int SUBSCRIPTION_INVALIDATE_OPERATION
This operation is used to indicate that the client's subscription to a remote destination has been invalidated.

See Also:
Constant Field Values

MULTI_SUBSCRIBE_OPERATION

public static final int MULTI_SUBSCRIBE_OPERATION
This operation is used by the MultiTopicConsumer to subscribe/unsubscribe from multiple subtopics/selectors in the same message.

See Also:
Constant Field Values

DISCONNECT_OPERATION

public static final int DISCONNECT_OPERATION
This operation is used to indicate that a channel has disconnected.

See Also:
Constant Field Values

TRIGGER_CONNECT_OPERATION

public static final int TRIGGER_CONNECT_OPERATION
This operation is used to trigger a client connect attempt.

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

MESSAGING_VERSION

public static final String MESSAGING_VERSION
Endpoints can imply what features they support by reporting the latest version of messaging they are capable of during the handshake of the initial ping CommandMessage.

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

SUBSCRIPTION_INVALIDATED_HEADER

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

See Also:
Constant Field Values

PRESERVE_DURABLE_HEADER

public static final String PRESERVE_DURABLE_HEADER
Durable JMS subscriptions are preserved when an unsubscribe message has this parameter set to true in its header.

See Also:
Constant Field Values

NEEDS_CONFIG_HEADER

public static final String NEEDS_CONFIG_HEADER
Header to indicate that the Channel needs the configuration from the server.

See Also:
Constant Field Values

ADD_SUBSCRIPTIONS

public static final String ADD_SUBSCRIPTIONS
Header used in a MULTI_SUBSCRIBE message to specify an Array of subtopic/selector pairs to add to the existing set of subscriptions.

See Also:
Constant Field Values

REMOVE_SUBSCRIPTIONS

public static final String REMOVE_SUBSCRIPTIONS
Like the above, but specifies the subtopic/selector array of to remove.

See Also:
Constant Field Values

SUBTOPIC_SEPARATOR

public static final String SUBTOPIC_SEPARATOR
The separator used in the add and remove subscription headers for multi subscribe messages.

See Also:
Constant Field Values

POLL_WAIT_HEADER

public static final String POLL_WAIT_HEADER
Header to drive an idle wait time before the next client poll request.

See Also:
Constant Field Values

NO_OP_POLL_HEADER

public static final String NO_OP_POLL_HEADER
Header to suppress poll response processing. If a client has a long-poll parked on the server and issues another poll, the response to this subsequent poll should be tagged with this header in which case the response is treated as a no-op and the next poll will not be scheduled. Without this, a subsequent poll will put the channel and endpoint into a busy polling cycle.

See Also:
Constant Field Values

CREDENTIALS_CHARSET_HEADER

public static final String CREDENTIALS_CHARSET_HEADER
Header to specify which character set encoding was used while encoding login credentials.

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

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 © 2008 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/blazeds/1/javadoc/flex/messaging/messages/CommandMessage.html