Package org.igniterealtime.jbosh
Class BOSHMessageEvent
- java.lang.Object
-
- java.util.EventObject
-
- org.igniterealtime.jbosh.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 Summary
Fields Modifier and Type Field Description private AbstractBody
body
Message which was sent or received.private static long
serialVersionUID
Serialized version.
-
Constructor Summary
Constructors Modifier Constructor Description private
BOSHMessageEvent(java.lang.Object source, AbstractBody cBody)
Creates a new message event instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static BOSHMessageEvent
createRequestSentEvent(BOSHClient source, AbstractBody body)
Creates a new message event for clients sending events to the connection manager.(package private) static BOSHMessageEvent
createResponseReceivedEvent(BOSHClient source, AbstractBody body)
Creates a new message event for clients receiving new messages from the connection manager.AbstractBody
getBody()
Gets the message body which was sent or received.
-
-
-
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 sourcecBody
- 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 messagebody
- 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 messagebody
- message body- Returns:
- event instance
-
getBody
public AbstractBody getBody()
Gets the message body which was sent or received.- Returns:
- message body
-
-