FileDocCategorySizeDatePackage
CometAsyncFilter.javaAPI DocGlassfish v2 API3839Fri May 04 22:37:08 BST 2007com.sun.enterprise.web.connector.grizzly.comet

CometAsyncFilter

public class CometAsyncFilter extends Object implements com.sun.enterprise.web.connector.grizzly.AsyncFilter
AJAX/Comet support using the Grizzly Asynchronous Request Processing default mechanism. Instance of this class represent an interrupted/polled/Comet request. Note: The request can be resumed anytime, and the polled request is not holding a thread.
author
Jeanfrancois Arcand

Fields Summary
private static final Logger
logger
Main logger
Constructors Summary
public CometAsyncFilter()
Comet Async Filter.

        
    
            
      
    
Methods Summary
public booleandoFilter(com.sun.enterprise.web.connector.grizzly.AsyncExecutor asyncExecutor)
Execute the Comet AsyncFilter by delegating the work to the CometEngine. At this stage, the request has already been interrupted.

        AsyncProcessorTask apt = (AsyncProcessorTask)asyncExecutor.getAsyncTask();
        CometEngine cometEngine = CometEngine.getEngine();                
        try{
            if (!cometEngine.handle(apt)) {
                return true;
            } 
        } catch (IOException ex){
            logger.log(Level.SEVERE,"CometAsyncFilter",ex);
        }
        return false;