Package org.igniterealtime.jbosh
Class BOSHMessageEvent
java.lang.Object
java.util.EventObject
org.igniterealtime.jbosh.BOSHMessageEvent
- All Implemented Interfaces:
Serializable
Event representing a message sent to or from a BOSH connection manager.
This class is immutable and thread-safe.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AbstractBodyMessage which was sent or received.private static final longSerialized version.Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateBOSHMessageEvent(Object source, AbstractBody cBody) Creates a new message event instance. -
Method Summary
Modifier and TypeMethodDescription(package private) static BOSHMessageEventcreateRequestSentEvent(BOSHClient source, AbstractBody body) Creates a new message event for clients sending events to the connection manager.(package private) static BOSHMessageEventcreateResponseReceivedEvent(BOSHClient source, AbstractBody body) Creates a new message event for clients receiving new messages from the connection manager.getBody()Gets the message body which was sent or received.Methods inherited from class java.util.EventObject
getSource, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialized version.- See Also:
-
body
Message which was sent or received.
-
-
Constructor Details
-
BOSHMessageEvent
Creates a new message event instance.- Parameters:
source- event sourcecBody- message body
-
-
Method Details
-
createRequestSentEvent
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
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
Gets the message body which was sent or received.- Returns:
- message body
-