Class RealTimeTextManager

    • Method Detail

      • createRealTimeMessage

        public final OutboundRealTimeMessage createRealTimeMessage​(Chat chat,
                                                                   String id)
        Creates a new real-time message for sending real-time text. This method is intended for creating a new message, when editing an existing message, when used in concert with XEP-0308: Last Message Correction.
        Parameters:
        chat - The chat to send real-time text with.
        id - The id of the message, which is edited with a real-time message.
        Returns:
        The real-time message.
        See Also:
        Replace
      • createRealTimeMessage

        public final OutboundRealTimeMessage createRealTimeMessage​(Chat chat)
        Creates a new real-time message for sending real-time text.
        Parameters:
        chat - The chat to send real-time text with.
        Returns:
        The real-time message.
      • addRealTimeMessageListener

        public final void addRealTimeMessageListener​(Consumer<RealTimeMessageEvent> realTimeMessageListener)
        Adds a real-time message listener, which allows to listen for new inbound real-time messages.
        Parameters:
        realTimeMessageListener - The listener.
      • activate

        public final void activate​(Chat chat)
        Activates real-time text for a chat session.
        Parameters:
        chat - The chat.
        See Also:
        6.1 Activating Real-Time Text
      • deactivate

        public final void deactivate​(Chat chat)
        Deactivates real-time text for a chat session.
        Parameters:
        chat - The chat.
        See Also:
        6.2 Deactivating Real-Time Text
      • isEnabled

        public final boolean isEnabled()
        Description copied from interface: ExtensionProtocol
        Indicates whether this protocol is enabled.
        Specified by:
        isEnabled in interface ExtensionProtocol
        Returns:
        true, if enabled; false if disabled.