FileDocCategorySizeDatePackage
CometEvent.javaAPI DocGlassfish v2 API4495Fri May 18 12:52:48 BST 2007com.sun.enterprise.web.connector.grizzly.comet

CometEvent

public class CometEvent extends Object
Simple event class used to pass information between CometHandler and the Comet implementation.
author
Jeanfrancois Arcand

Fields Summary
public static final int
INTERRUPT
Interrupt the CometHandler.
public static final int
NOTIFY
Notify the CometHandler.
public static final int
INITIALIZE
Initialize the CometHandler.
public static final int
TERMINATE
Terminate the CometHandler.
public static final int
READ
Notify the CometHandler of available bytes.
public static final int
WRITE
Notify the CometHandler when the channel is writable.
protected int
type
This type of event.
protected E
attachment
Share an E amongst CometHandler
private CometContext
cometContext
The CometContext from where this instance was fired.
Constructors Summary
public CometEvent()
Create a new ComettEvent

            
    
             
      
        type = NOTIFY;
    
Methods Summary
public voidattach(E attachment)
Attach an

param
attachment An attachment.

        this.attachment = attachment;
    
public Eattachment()
Return the attachment

return
attachment An attachment.

        return attachment;
    
public CometContextgetCometContext()
Return the CometContext that fired this event.

        return cometContext;
    
public intgetType()
Return the type of this object.

return
int Return the type of this object

        return type;
    
protected voidsetCometContext(CometContext cometContext)
Set the CometContext that fired this event.

        this.cometContext = cometContext;
    
protected voidsetType(int type)
Set the type of this object.

param
int the type of this object

        this.type = type;