public class MessageInfo
extends java.lang.Object
LSClient.sendMessage(MessageInfo,SendMessageListener)
.
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.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
UNORDERED_MESSAGES
Constant representing the special sequence name to be used to prevent the sequential management of the messages on the server.
|
Constructor and Description |
---|
MessageInfo(java.lang.String message,
java.lang.String sequence)
Create an object to be used to send a message to a Lightstreamer Server.
|
MessageInfo(java.lang.String message,
java.lang.String sequence,
int delayTimeout)
Create an object to be used to send a message to a Lightstreamer Server.
|
Modifier and Type | Method and Description |
---|---|
int |
getDelayTimeout()
Recalls the delay timeout specified for this message.
|
java.lang.String |
getMessage()
Recalls the message to be sent to the server.
|
java.lang.String |
getSequence()
Recalls sequence name specified for this message.
|
java.lang.String |
toString() |
public static final java.lang.String UNORDERED_MESSAGES
public MessageInfo(java.lang.String message, java.lang.String sequence)
LSClient.sendMessage(MessageInfo,SendMessageListener)
in order to be forwarded
to the server.message
- A text String to be interpreted by the Metadata Adapter. It should not be nullsequence
- 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 in the sequence is
given by the LSClient.sendMessage() method. If sequential management is undesired, the special UNORDERED_MESSAGES
sequence identifier can be used. A sequence can be composed only of alphanumeric characters and underscores.
Note that the Server in case of a hole in the sequence's progressive,
before declaring the previous message as lost, will use a timeout based on its own configuration.java.lang.IllegalArgumentException
- Thrown if a null message is specified or if the given sequence name is invalid.public MessageInfo(java.lang.String message, java.lang.String sequence, int delayTimeout)
LSClient.sendMessage(MessageInfo,SendMessageListener)
in order to be forwarded
to the server.message
- A text String to be interpreted by the Metadata Adapter. It should not be nullsequence
- 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 in the sequence is
given by the LSClient.sendMessage() method. If sequential management is undesired, the special UNORDERED_MESSAGES
sequence identifier can be used. A sequence can be composed only of alphanumeric characters and underscores.delayTimeout
- The timeout the Server should wait in case of a hole in the sequence's progressive
before declaring the previous message as lost.
java.lang.IllegalArgumentException
- Thrown if a null message is specified or if the given sequence name is invalid.public java.lang.String toString()
toString
in class java.lang.Object
public int getDelayTimeout()
public java.lang.String getSequence()
public java.lang.String getMessage()