|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.grizzly.comet.DefaultNotificationHandler
public class DefaultNotificationHandler
Default Notificationhandler that uses the same a Grizzly Pipeline to execute the notification process.
Field Summary | |
---|---|
protected boolean |
blockingNotification
true if the caller of CometContext.notify should block when notifying other CometHandler. |
protected Pipeline |
pipeline
The Pipeline used to execute threaded notification. |
Constructor Summary | |
---|---|
DefaultNotificationHandler()
|
Method Summary | |
---|---|
boolean |
isBlockingNotification()
Return true if the invoker of notify() should block when notifying Comet Handlers. |
void |
notify(CometEvent cometEvent,
CometHandler cometHandler)
Notify a single CometHandler . |
void |
notify(CometEvent cometEvent,
Iterator<CometHandler> iteratorHandlers)
Notify all CometHandler . |
protected void |
notify0(CometEvent cometEvent,
CometHandler cometHandler)
Notify a CometHandler . |
protected void |
notify0(CometEvent cometEvent,
Iterator<CometHandler> iteratorHandlers)
|
void |
setBlockingNotification(boolean blockingNotification)
Set to true if the invoker of notify() should block when notifying Comet Handlers. |
protected void |
setPipeline(Pipeline pipeline)
Set the Pipeline used for notifying the CometHandler. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Pipeline pipeline
Pipeline
used to execute threaded notification.
protected boolean blockingNotification
Constructor Detail |
---|
public DefaultNotificationHandler()
Method Detail |
---|
protected void setPipeline(Pipeline pipeline)
Pipeline
used for notifying the CometHandler.
public boolean isBlockingNotification()
isBlockingNotification
in interface NotificationHandler
public void setBlockingNotification(boolean blockingNotification)
setBlockingNotification
in interface NotificationHandler
public void notify(CometEvent cometEvent, Iterator<CometHandler> iteratorHandlers) throws IOException
CometHandler
.
notify
in interface NotificationHandler
cometEvent
- the CometEvent used to notify CometHandleriteratorHandlers
- An iterator over a list of CometHandler
IOException
protected void notify0(CometEvent cometEvent, Iterator<CometHandler> iteratorHandlers) throws IOException
IOException
public void notify(CometEvent cometEvent, CometHandler cometHandler) throws IOException
CometHandler
.
notify
in interface NotificationHandler
cometEvent
- the CometEvent used to notify CometHandlercometHandler
- a CometHandler
IOException
protected void notify0(CometEvent cometEvent, CometHandler cometHandler) throws IOException
CometHandler
.
CometEvent.INTERRUPT -> CometHandler.onInterrupt
CometEvent.NOTIFY -> CometHandler.onEvent
CometEvent.INITIALIZE -> CometHandler.onInitialize
CometEvent.TERMINATE -> CometHandler.onTerminate
CometEvent.READ -> CometHandler.onEvent
CometEvent.WRITE -> CometHandler.onEvent
attachment
- An object shared amongst CometHandler
.cometHandler
- The CometHandler to invoke.
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |