Packagecom.lightstreamer.as_client
Classpublic class Message
InheritanceMessage Inheritance Object

A Message object that will be sent to a Lightstreamer Server through a call to LSClient.sendMessage(). The class contains the message string, the sequence to which such message is associated and a timeout to wait before the server declares lost the previous message in sequence.



Public Properties
 PropertyDefined By
  sequence : String
[read-only] The sequence name to which this message is associated.
Message
Public Methods
 MethodDefined By
  
Message(message:String, sequence:String, delayTimeout:int = -1)
Create an object to be used to send a message to a Lightstreamer Server.
Message
Public Constants
 ConstantDefined By
  UNORDERED_MESSAGES : String = UNORDERED_MESSAGES
[static] String costant representing the special sequence name to be used to prevent the sequential management of the messages on the server.
Message
Property Detail
sequenceproperty
sequence:String  [read-only]

The sequence name to which this message is associated.


Implementation
    public function get sequence():String
Constructor Detail
Message()Constructor
public function Message(message:String, sequence:String, delayTimeout:int = -1)

Create an object to be used to send a message to a Lightstreamer Server. The object can be supplied to LSClient.sendMessage() in order to be forwarded to the server.

Parameters
message:String — A text String to be interpreted by the Metadata Adapter. It should not be null
 
sequence:String — The sequence identifier for this Message. Messages pertaining to the same sequence are guaranteed to be processed by the server in order. The position of the message int the sequence is given by the LSClient.sendMessage() method.

The sequence name must be alphanumeric, with the underscore character also allowed; it cannot be empty or null. If sequential management is undesired, the special UNORDERED_MESSAGES sequence identifier can be used.

 
delayTimeout:int (default = -1) — The timeout the Server should wait in case of a hole in the sequence's progressive before declaring the previous message as lost.

The Server may, however, impose a lower limit on the timeout, in order to protect itself.

A 0 timeout can be set, meaning that the Server will not wait at all for missing messages.

When the UNORDERED_MESSAGES sequence is used, this timeout is ignored by the server; however, even in this case, if a hole in the sequence's progressive occurs, the Server may declare a message as lost after a Server-decided timeout.

If no (or negative) value is supplied, the Server will use a timeout based on its own configuration.


Throws
ConfigurationError — A sequence name was not specified.

See also

Constant Detail
UNORDERED_MESSAGESConstant
public static const UNORDERED_MESSAGES:String = UNORDERED_MESSAGES

String costant representing the special sequence name to be used to prevent the sequential management of the messages on the server.