com.sun.grizzly.bayeux
Class BayeuxExternalServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.sun.grizzly.bayeux.BayeuxExternalServlet
- All Implemented Interfaces:
- Serializable, Servlet, ServletConfig
public class BayeuxExternalServlet
- extends HttpServlet
Simple Servlet that update the Chat demo via a simple Http request
http://host:port/BayeuxExternalServlet/?message=hello,user=moi
- Author:
- Jeanfrancois Arcand
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
timer
public ScheduledThreadPoolExecutor timer
- Push message on the chat room every 10 seconds.
BayeuxExternalServlet
public BayeuxExternalServlet()
init
public void init(ServletConfig config)
throws ServletException
- Initialize the Servlet by creating the CometContext.
- Specified by:
init
in interface Servlet
- Overrides:
init
in class GenericServlet
- Throws:
ServletException
destroy
public void destroy()
- Specified by:
destroy
in interface Servlet
- Overrides:
destroy
in class GenericServlet
doGet
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException
- Overrides:
doGet
in class HttpServlet
- Throws:
ServletException
IOException
doPost
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException
- See
- Overrides:
doPost
in class HttpServlet
- Parameters:
request
- response
-
- Throws:
ServletException
IOException
Copyright © 2012 Oracle Corporation. All Rights Reserved.