public final class OutboundRealTimeMessage
extends java.lang.Object
An outbound real-time message.
Modifier and Type | Method and Description |
---|---|
SendTask<Message> |
commit()
Commits the real-time message.
|
java.lang.String |
getId() |
long |
getRefreshInterval()
Gets the refresh interval, after which a refresh message is sent to ensure real-time text is kept in sync.
|
int |
getSequence()
Gets the sequence number of this real-time message.
|
java.lang.String |
getText()
Gets the current text.
|
long |
getTransmissionInterval()
Gets the transmission interval of real-time text.
|
boolean |
isComplete()
Indicates whether this real-time message is complete.
|
void |
reset()
Sends a message refresh.
|
void |
reset(java.lang.String id,
java.lang.CharSequence text)
Sends a message refresh, if you want to switch the message, which is being edited.
|
java.lang.String |
toString() |
void |
update(java.lang.CharSequence text)
Updates the text.
|
public final void update(java.lang.CharSequence text)
Updates the text. The passed text is the complete text of the text field / text area. Action elements are computed automatically and are sent to the recipient.
text
- The text.public final void reset()
Sends a message refresh. A new sequence id is generated and the current text is sent. This method is usually called automatically in during the refresh interval.
public final void reset(java.lang.String id, java.lang.CharSequence text)
Sends a message refresh, if you want to switch the message, which is being edited. Use this method, if you are composing a new message and want to switch to another (previous) message.
id
- The message id for the message which is edited.text
- The text to reset this message to.public final java.lang.String getText()
public final SendTask<Message> commit()
Commits the real-time message.
public final long getRefreshInterval()
Gets the refresh interval, after which a refresh message is sent to ensure real-time text is kept in sync. The default is 10 seconds.
public final long getTransmissionInterval()
Gets the transmission interval of real-time text. The default is 700 milliseconds.
public final boolean isComplete()
public final int getSequence()
public final java.lang.String getId()
public final java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2014–2019 XMPP.rocks. All rights reserved.