|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.grizzly.comet.CometContext<E>
com.sun.enterprise.web.connector.grizzly.comet.CometContext<E>
CometContext
public class CometContext<E>
The main object used by CometHandler.
The CometContext is always available for CometHandler
and can be used to invokeCometHandler other CometHandler.
Attributes can be added/removed the same way HttpServletSession
is doing. It is not recommended to use attributes if this
CometContext is not shared amongs multiple
context path (uses HttpServletSession instead).
| Field Summary | |
|---|---|
protected CometEvent |
eventInitialize
Deprecated. |
protected CometEvent |
eventInterrupt
Deprecated. |
protected CometEvent |
eventTerminate
Deprecated. |
| Fields inherited from class com.sun.grizzly.comet.CometContext |
|---|
ALREADY_REMOVED, blockingNotification, continuationType, handlers, INVALID_COMET_HANDLER, logger, notificationHandler, topic |
| Constructor Summary | |
|---|---|
CometContext(String contextPath,
int continuationType)
Deprecated. |
|
| Method Summary | |
|---|---|
int |
addCometHandler(CometHandler handler)
Deprecated. |
int |
addCometHandler(CometHandler handler,
boolean completeExecution)
Deprecated. |
CometHandler |
getCometHandler(int hashCode)
Deprecated. |
protected ConcurrentHashMap<CometHandler,CometTask> |
handlers()
Deprecated. Return the internal list of active CometHandler |
protected void |
initialize(CometHandler handler)
Deprecated. |
boolean |
isActive(CometHandler cometHandler)
Deprecated. |
void |
notify(Object attachment)
Deprecated. |
void |
notify(Object attachment,
int eventType,
int cometHandlerID)
Deprecated. |
void |
removeCometHandler(CometHandler handler)
Deprecated. |
boolean |
removeCometHandler(int hashCode)
Deprecated. |
boolean |
resumeCometHandler(CometHandler handler)
Deprecated. Resume the Comet request and remove it from the active CometHandler list. |
protected void |
setTopic(String topic)
Deprecated. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final CometEvent eventInitialize
protected final CometEvent eventInterrupt
protected final CometEvent eventTerminate
| Constructor Detail |
|---|
public CometContext(String contextPath,
int continuationType)
| Method Detail |
|---|
protected void setTopic(String topic)
public int addCometHandler(CometHandler handler,
boolean completeExecution)
public int addCometHandler(CometHandler handler)
public CometHandler getCometHandler(int hashCode)
getCometHandler in class CometContext<E>public void removeCometHandler(CometHandler handler)
public boolean removeCometHandler(int hashCode)
removeCometHandler in class CometContext<E>public boolean resumeCometHandler(CometHandler handler)
CometHandler list. Once resumed,
a CometHandler must never manipulate the HttpServletRequest or HttpServletResponse as
those object will be recycled and may be re-used to serve another request.
If you cache them for later reuse by another thread there is a
possibility to introduce corrupted responses next time a request is made.
handler - The CometHandler to resume.
public void notify(Object attachment)
throws IOException
notify in class CometContext<E>IOExceptionpublic boolean isActive(CometHandler cometHandler)
public void notify(Object attachment,
int eventType,
int cometHandlerID)
throws IOException
notify in class CometContext<E>IOExceptionprotected ConcurrentHashMap<CometHandler,CometTask> handlers()
CometHandler
handlers in class CometContext<E>CometHandler
protected void initialize(CometHandler handler)
throws IOException
initialize in class CometContext<E>IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||