Top Description Inners Fields Constructors Methods
org.glassfish.grizzly.comet

public Class CometEvent<E>

extends Object
Class Inheritance

Simple event class used to pass information between CometHandler and the Comet implementation.
Author
Jeanfrancois Arcand

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Field Summary

Modifier and TypeField and Description
protected E
attachment

Share an E amongst CometHandler

private CometContext<E>
cometContext

The CometContext from where this instance was fired.

private static final long
protected CometEvent.Type
type

This type of event.

Constructor Summary

AccessConstructor and Description
public
CometEvent()

Create a new CometEvent

public
public
public
CometEvent(CometEvent.Type type, CometContext<E> cometContext, E attachment)

Method Summary

Modifier and TypeMethod and Description
public void
attach(E
An attachment.
attachment
)

Attach an <e>

public E

Returns:

attachment An attachment.
attachment
()

Return the attachment <e>

public CometContext<E>
getCometContext()

Return the CometContext that fired this event.

public CometEvent.Type

Returns:

int Return the type of this object
getType
()

Return the type of this object.

protected void
setCometContext(CometContext<E> cometContext)

Set the CometContext that fired this event.

protected void
setType(CometEvent.Type
the type of this object
type
)

Set the type of this object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

attachmentback to summary
protected E attachment

Share an E amongst CometHandler

cometContextback to summary
private CometContext<E> cometContext

The CometContext from where this instance was fired.

serialVersionUIDback to summary
private static final long serialVersionUID
typeback to summary
protected CometEvent.Type type

This type of event.

Constructor Detail

CometEventback to summary
public CometEvent()

Create a new CometEvent

CometEventback to summary
public CometEvent(CometEvent.Type type)
CometEventback to summary
public CometEvent(CometEvent.Type type, CometContext<E> context)
CometEventback to summary
public CometEvent(CometEvent.Type type, CometContext<E> cometContext, E attachment)

Method Detail

attachback to summary
public void attach(E attachment)

Attach an

Parameters
attachment:E

An attachment.

attachmentback to summary
public E attachment()

Return the attachment

Returns:E

attachment An attachment.

getCometContextback to summary
public CometContext<E> getCometContext()

Return the CometContext that fired this event.

getTypeback to summary
public CometEvent.Type getType()

Return the type of this object.

Returns:CometEvent.Type

int Return the type of this object

setCometContextback to summary
protected void setCometContext(CometContext<E> cometContext)

Set the CometContext that fired this event.

setTypeback to summary
protected void setType(CometEvent.Type type)

Set the type of this object.

Parameters
type:CometEvent.Type

the type of this object

org.glassfish.grizzly.comet back to summary

public final Enum CometEvent.Type

extends Enum<CometEvent.Type>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final CometEvent.Type
public static final CometEvent.Type
public static final CometEvent.Type
public static final CometEvent.Type
public static final CometEvent.Type
public static final CometEvent.Type

Constructor Summary

AccessConstructor and Description
private
Type()

Method Summary

Modifier and TypeMethod and Description
public static CometEvent.Type
public static CometEvent.Type[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

INITIALIZEback to summary
public static final CometEvent.Type INITIALIZE
INTERRUPTback to summary
public static final CometEvent.Type INTERRUPT
NOTIFYback to summary
public static final CometEvent.Type NOTIFY
READback to summary
public static final CometEvent.Type READ
TERMINATEback to summary
public static final CometEvent.Type TERMINATE
WRITEback to summary
public static final CometEvent.Type WRITE

Constructor Detail

Typeback to summary
private Type()

Method Detail

valueOfback to summary
public static CometEvent.Type valueOf(String name)
valuesback to summary
public static CometEvent.Type[] values()