com.caucho.servlet.comet
Class GenericCometServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by com.caucho.servlet.comet.GenericCometServlet
All Implemented Interfaces:
CometServlet, java.io.Serializable, Servlet, ServletConfig

public abstract class GenericCometServlet
extends GenericServlet
implements CometServlet

Servlet to handle comet requests.

See Also:
Serialized Form

Constructor Summary
GenericCometServlet()
           
 
Method Summary
 boolean resume(ServletRequest request, ServletResponse response, CometController controller)
          Resumes service the initial request.
 void service(ServletRequest request, ServletResponse response)
          Implementation of the servlet's request.
abstract  boolean service(ServletRequest request, ServletResponse response, CometController controller)
          Services the initial request.
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.servlet.Servlet
destroy, getServletConfig, getServletInfo, init
 

Constructor Detail

GenericCometServlet

public GenericCometServlet()
Method Detail

service

public abstract boolean service(ServletRequest request,
                                ServletResponse response,
                                CometController controller)
                         throws java.io.IOException,
                                ServletException
Services the initial request.

Specified by:
service in interface CometServlet
Parameters:
request - the servlet request object
response - the servlet response object
controller - the controller to be passed to application code
Returns:
true for keepalive, false for the end of the request
Throws:
java.io.IOException
ServletException

resume

public boolean resume(ServletRequest request,
                      ServletResponse response,
                      CometController controller)
               throws java.io.IOException,
                      ServletException
Resumes service the initial request.

Specified by:
resume in interface CometServlet
Parameters:
request - the servlet request object
response - the servlet response object
controller - the controller to be passed to application code
Returns:
true for keepalive, false for the end of the request
Throws:
java.io.IOException
ServletException

service

public final void service(ServletRequest request,
                          ServletResponse response)
                   throws java.io.IOException,
                          ServletException
Implementation of the servlet's request.

Specified by:
service in interface Servlet
Parameters:
request - request information. Normally servlets will cast this to HttpServletRequest
response - response information. Normally servlets will cast this to HttpServletRequest
Throws:
java.io.IOException
ServletException