public class BayeuxServlet extends HttpServlet implements HttpEventServlet
Modifier and Type | Field and Description |
---|---|
protected int |
reconnectInterval
The reconnect interval.
|
protected TomcatBayeux |
tb
Reference to the global TomcatBayeux object
|
protected int |
timeout
The timeout.
|
static java.lang.String |
TOMCAT_BAYEUX_ATTR
Attribute to hold the TomcatBayeux object in the servlet context
|
Constructor and Description |
---|
BayeuxServlet() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkBayeux(HttpEvent cometEvent) |
void |
destroy()
Upon servlet destruction, the servlet will clean up the
TomcatBayeux object and terminate any outstanding events.
|
void |
event(HttpEvent cometEvent)
Process the given IO event.
|
protected int |
getReconnectInterval() |
java.lang.String |
getServletInfo() |
protected int |
getTimeout()
Returns the preconfigured connection timeout.
|
protected int |
handleBayeux(java.lang.String message,
HttpEvent event) |
void |
init() |
void |
service(ServletRequest servletRequest,
ServletResponse servletResponse) |
protected int timeout
protected int reconnectInterval
public static final java.lang.String TOMCAT_BAYEUX_ATTR
protected TomcatBayeux tb
public void destroy()
protected int getTimeout()
timeout
then the default of 2min will be used.protected int getReconnectInterval()
public void event(HttpEvent cometEvent) throws java.io.IOException, ServletException
HttpEventServlet
event
in interface HttpEventServlet
cometEvent
- The event that will be processedjava.io.IOException
ServletException
protected void checkBayeux(HttpEvent cometEvent) throws java.io.IOException, java.lang.UnsupportedOperationException
cometEvent
- CometEventjava.io.IOException
java.lang.UnsupportedOperationException
protected int handleBayeux(java.lang.String message, HttpEvent event) throws java.io.IOException, ServletException
java.io.IOException
ServletException
public java.lang.String getServletInfo()
public void init() throws ServletException
ServletException
public void service(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, java.io.IOException
ServletException
java.io.IOException