Class OutboundRealTimeMessage


  • public final class OutboundRealTimeMessage
    extends Object
    An outbound real-time message.
    • Method Detail

      • update

        public final void update​(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.
        Parameters:
        text - The text.
      • reset

        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.
        See Also:
        4.7.3 Message Refresh
      • reset

        public final void reset​(String id,
                                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.
        Parameters:
        id - The message id for the message which is edited.
        text - The text to reset this message to.
        See Also:
        7.5.3 Usage with Last Message Correction
      • getText

        public final String getText()
        Gets the current text.
        Returns:
        The text.
      • commit

        public final SendTask<Message> commit()
        Commits the real-time message.
        Returns:
        The final message.
      • getRefreshInterval

        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.
        Returns:
        The refresh interval.
        See Also:
        4.7.3 Message Refresh
      • getTransmissionInterval

        public final long getTransmissionInterval()
        Gets the transmission interval of real-time text. The default is 700 milliseconds.
        Returns:
        The refresh interval.
        See Also:
        4.5 Transmission Interval
      • isComplete

        public final boolean isComplete()
        Indicates whether this real-time message is complete.
        Returns:
        True, if the message is complete.
      • getSequence

        public final int getSequence()
        Gets the sequence number of this real-time message.
        Returns:
        The sequence number.
      • getId

        public final String getId()