Class BOSHMessageEvent

  • All Implemented Interfaces:
    java.io.Serializable

    public final class BOSHMessageEvent
    extends java.util.EventObject
    Event representing a message sent to or from a BOSH connection manager.

    This class is immutable and thread-safe.

    See Also:
    Serialized Form
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Serialized version.
        See Also:
        Constant Field Values
      • body

        private final AbstractBody body
        Message which was sent or received.
    • Constructor Detail

      • BOSHMessageEvent

        private BOSHMessageEvent​(java.lang.Object source,
                                 AbstractBody cBody)
        Creates a new message event instance.
        Parameters:
        source - event source
        cBody - message body
    • Method Detail

      • createRequestSentEvent

        static BOSHMessageEvent createRequestSentEvent​(BOSHClient source,
                                                       AbstractBody body)
        Creates a new message event for clients sending events to the connection manager.
        Parameters:
        source - sender of the message
        body - message body
        Returns:
        event instance
      • createResponseReceivedEvent

        static BOSHMessageEvent createResponseReceivedEvent​(BOSHClient source,
                                                            AbstractBody body)
        Creates a new message event for clients receiving new messages from the connection manager.
        Parameters:
        source - receiver of the message
        body - message body
        Returns:
        event instance
      • getBody

        public AbstractBody getBody()
        Gets the message body which was sent or received.
        Returns:
        message body