flex.messaging.io.amf
Class ActionMessage

java.lang.Object
  extended by flex.messaging.io.amf.ActionMessage
All Implemented Interfaces:
Serializable

public class ActionMessage
extends Object
implements Serializable

This class represents a protocol message with its collection of headers and bodies.

See Also:
Serialized Form

Field Summary
static int CURRENT_VERSION
          Current protocol version is 3.
 
Constructor Summary
ActionMessage()
          Create a message using the current protocol version and UTF-8 encoding.
ActionMessage(int version)
          Create a message with a given protocol version and encoding.
 
Method Summary
 void addBody(MessageBody b)
          Add a body to the message.
 void addHeader(MessageHeader h)
          Add a header to the message.
 ArrayList getBodies()
          Retrieve all message bodies.
 MessageBody getBody(int pos)
          Retrieve a particular message body.
 int getBodyCount()
          Retrieve the number of bodies in the message.
 MessageHeader getHeader(int pos)
          Retrieve a particular message header.
 int getHeaderCount()
          Retrieve the number of headers in the message.
 ArrayList getHeaders()
          Retrieve all message header.
 int getVersion()
          Retrieve the protocol version of the message.
 void setVersion(int version)
          Override the protocol version of the message.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CURRENT_VERSION

public static final int CURRENT_VERSION
Current protocol version is 3.

See Also:
Constant Field Values
Constructor Detail

ActionMessage

public ActionMessage()
Create a message using the current protocol version and UTF-8 encoding.


ActionMessage

public ActionMessage(int version)
Create a message with a given protocol version and encoding.

Parameters:
version - Protocol version
Method Detail

getVersion

public int getVersion()
Retrieve the protocol version of the message.

Returns:
protocol version of current message

setVersion

public void setVersion(int version)
Override the protocol version of the message.

Parameters:
version - protocol version of current message

getHeaderCount

public int getHeaderCount()
Retrieve the number of headers in the message.

Returns:
number of headers in message

getHeader

public MessageHeader getHeader(int pos)
Retrieve a particular message header.

Parameters:
pos - MessageHeader position [0, getHeaderCount())
Returns:
The header at the specified position

getHeaders

public ArrayList getHeaders()
Retrieve all message header.

Returns:
The headers as an ArrayList Note: primarily for use by the MessageProcessor

addHeader

public void addHeader(MessageHeader h)
Add a header to the message.

Parameters:
h - MessageHeader to add

getBodyCount

public int getBodyCount()
Retrieve the number of bodies in the message.

Returns:
number of bodies in message

getBody

public MessageBody getBody(int pos)
Retrieve a particular message body.

Parameters:
pos - MessageBody position [0, getBodyCount())
Returns:
The body at the specified position

getBodies

public ArrayList getBodies()
Retrieve all message bodies.

Returns:
The bodies as an ArrayList Note: primarily for use by the MessageProcessor

addBody

public void addBody(MessageBody b)
Add a body to the message.

Parameters:
b - MessageBody to add


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/io/amf/ActionMessage.html