Main class allowing Comet support on top of Grizzly Asynchronous Request Processing mechanism. This class is the entry point to any component interested to execute Comet request style. Components can be Servlets, JSP, JSF or pure Java class. A component interested to support Comet request must do:
(1) First, register the topic on which Comet support will be applied: CometEngine cometEngine = CometEngine.getEngine() CometContext cometContext = cometEngine.register(topic) (2) Second, add an instance of {@link CometHandler} to the{@link CometContext} returned by the register method:{@link CometContext#addCometHandler}. Executing this operation will tells Grizzly to suspend the response. (3) Finally, you can {@link CometContext#notify} other {@link CometHandler}to share information between {@ CometHandler}. When notified, {@link CometHandler} can decides to push back the data, resume theresponse, or simply ignore the content of the notification.
You can also select the stage where the suspension of the response happens when registering the {@link CometContext}'s topic (see {@link #register}), which can be before, during or after invoking a {@link Servlet}
@author Jeanfrancois Arcand