com.sun.grizzly.bayeux
Class BayeuxExternalServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by 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

Field Summary
 ScheduledThreadPoolExecutor timer
          Push message on the chat room every 10 seconds.
 
Constructor Summary
BayeuxExternalServlet()
           
 
Method Summary
 void destroy()
           
 void doGet(HttpServletRequest request, HttpServletResponse response)
           
 void doPost(HttpServletRequest request, HttpServletResponse response)
          See
 void init(ServletConfig config)
          Initialize the Servlet by creating the CometContext.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

timer

public ScheduledThreadPoolExecutor timer
Push message on the chat room every 10 seconds.

Constructor Detail

BayeuxExternalServlet

public BayeuxExternalServlet()
Method Detail

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.