Interface CometHandler<E>

All Known Implementing Classes:
DefaultCometHandler, DefaultConcurrentCometHandler

public interface CometHandler<E>
This interface represents a suspended connection (or response). Passing an instance of this class to CometContext.addCometHandler(CometHandler) automatically tells Grizzly Comet to suspend the underlying connection and to avoid committing the response. Since the response is not committed, the connection is considered as suspended and can be resumed later when an event happens by invoking CometContext.resumeCometHandler(CometHandler), from onEvent(org.glassfish.grizzly.comet.CometEvent). CometContext.resumeCometHandler(CometHandler), resume the connection by committing the response. As an example, a browser icons will spins when a connection is suspended, as the complete response hasn't been sent back.

Components that implement this interface will be notified Object.notify() is invoked or when the CometContext.getExpirationDelay() expires.