com.acme
Class CometServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.acme.CometServlet
All Implemented Interfaces:
java.io.Serializable, Servlet, ServletConfig

public class CometServlet
extends HttpServlet

CometServlet This servlet implements the Comet API from tc6.x with the exception of the read method.

Author:
gregw
See Also:
Serialized Form

Constructor Summary
CometServlet()
           
 
Method Summary
 void begin(HttpServletRequest request, HttpServletResponse response)
           
 void end(HttpServletRequest request, HttpServletResponse response)
           
 void error(HttpServletRequest request, HttpServletResponse response)
           
 boolean read(HttpServletRequest request, HttpServletResponse response)
           
protected  void service(HttpServletRequest request, HttpServletResponse response)
          Receives standard HTTP requests from the public service method and dispatches them to the doXXX methods defined in this class.
 void setTimeout(HttpServletRequest request, HttpServletResponse response, int timeout)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CometServlet

public CometServlet()
Method Detail

begin

public void begin(HttpServletRequest request,
                  HttpServletResponse response)
           throws java.io.IOException,
                  ServletException
Throws:
java.io.IOException
ServletException

end

public void end(HttpServletRequest request,
                HttpServletResponse response)
         throws java.io.IOException,
                ServletException
Throws:
java.io.IOException
ServletException

error

public void error(HttpServletRequest request,
                  HttpServletResponse response)
           throws java.io.IOException,
                  ServletException
Throws:
java.io.IOException
ServletException

read

public boolean read(HttpServletRequest request,
                    HttpServletResponse response)
             throws java.io.IOException,
                    ServletException
Throws:
java.io.IOException
ServletException

service

protected void service(HttpServletRequest request,
                       HttpServletResponse response)
                throws java.io.IOException,
                       ServletException
Description copied from class: HttpServlet
Receives standard HTTP requests from the public service method and dispatches them to the doXXX methods defined in this class. This method is an HTTP-specific version of the Servlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) method. There's no need to override this method.

Overrides:
service in class HttpServlet
Parameters:
request - the HttpServletRequest object that contains the request the client made of the servlet
response - the HttpServletResponse object that contains the response the servlet returns to the client
Throws:
java.io.IOException - if an input or output error occurs while the servlet is handling the HTTP request
ServletException - if the HTTP request cannot be handled
See Also:
Servlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)

setTimeout

public void setTimeout(HttpServletRequest request,
                       HttpServletResponse response,
                       int timeout)
                throws java.io.IOException,
                       ServletException,
                       java.lang.UnsupportedOperationException
Throws:
java.io.IOException
ServletException
java.lang.UnsupportedOperationException


Copyright © 1995-2009 Mort Bay Consulting. All Rights Reserved.