Package org.glassfish.grizzly.comet
Class CometEvent<E>
java.lang.Object
org.glassfish.grizzly.comet.CometEvent<E>
Simple event class used to pass information between
CometHandler and the Comet implementation.- Author:
- Jeanfrancois Arcand
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected EShare anEamongstCometHandlerprotected CometEvent.TypeThis type of event. -
Constructor Summary
ConstructorsConstructorDescriptionCreate a newCometEventCometEvent(CometEvent.Type type) CometEvent(CometEvent.Type type, CometContext context) CometEvent(CometEvent.Type type, CometContext cometContext, E attachment) -
Method Summary
Modifier and TypeMethodDescriptionvoidAttach anReturn the attachmentReturn theCometContextthat fired this event.getType()Return thetypeof this object.protected voidsetCometContext(CometContext cometContext) Set theCometContextthat fired this event.protected voidsetType(CometEvent.Type type) Set thetypeof this object.
-
Field Details
-
type
This type of event. -
attachment
Share anEamongstCometHandler
-
-
Constructor Details
-
CometEvent
public CometEvent()Create a newCometEvent -
CometEvent
-
CometEvent
-
CometEvent
-
-
Method Details
-
getType
Return thetypeof this object.- Returns:
- int Return the
typeof this object
-
setType
Set thetypeof this object.- Parameters:
type- thetypeof this object
-
attach
Attach an- Parameters:
attachment- An attachment.
-
attachment
Return the attachment- Returns:
- attachment An attachment.
-
getCometContext
Return theCometContextthat fired this event. -
setCometContext
Set theCometContextthat fired this event.
-