org.jboss.errai.bus.server.servlet
Class AbstractErraiServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.jboss.errai.bus.server.servlet.AbstractErraiServlet
- All Implemented Interfaces:
- Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- Direct Known Subclasses:
- DefaultBlockingServlet, JettyContinuationsServlet, StandardAsyncServlet
public abstract class AbstractErraiServlet
- extends javax.servlet.http.HttpServlet
The AbstractErraiServlet provides a starting point for creating Http-protocol gateway between the server
bus and the client buses.
- See Also:
- Serialized Form
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doGet, doHead, doOptions, doPost, 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 |
SSE_TERMINATION_BYTES
protected final byte[] SSE_TERMINATION_BYTES
service
protected ErraiService service
sessionProvider
protected SessionProvider<javax.servlet.http.HttpSession> sessionProvider
AbstractErraiServlet
public AbstractErraiServlet()
getConnectionPhase
public static AbstractErraiServlet.ConnectionPhase getConnectionPhase(javax.servlet.http.HttpServletRequest request)
init
public void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
- Specified by:
init
in interface javax.servlet.Servlet
- Overrides:
init
in class javax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
initAsFilter
public void initAsFilter(javax.servlet.FilterConfig config)
throws javax.servlet.ServletException
- Throws:
javax.servlet.ServletException
destroy
public void destroy()
- Specified by:
destroy
in interface javax.servlet.Servlet
- Overrides:
destroy
in class javax.servlet.GenericServlet
writeToOutputStream
public static void writeToOutputStream(OutputStream stream,
String encodedMessage)
throws IOException
- Writes the message to the output stream
- Parameters:
stream
- - the stream to write toencodedMessage
- - the message to write to the stream
- Throws:
IOException
- - is thrown if any input/output errors occur while writing to the stream
writeExceptionToOutputStream
protected void writeExceptionToOutputStream(javax.servlet.http.HttpServletResponse httpServletResponse,
Throwable t)
throws IOException
- Throws:
IOException
sendDisconnectWithReason
protected void sendDisconnectWithReason(OutputStream stream,
String reason)
throws IOException
- Throws:
IOException
sendDisconnectDueToSessionExpiry
protected void sendDisconnectDueToSessionExpiry(javax.servlet.http.HttpServletResponse response)
throws IOException
- Throws:
IOException
getClientId
protected static String getClientId(javax.servlet.http.HttpServletRequest request)
getLongPollTimeout
protected int getLongPollTimeout()
getSSETimeout
protected final int getSSETimeout()
isLongPollingEnabled
public boolean isLongPollingEnabled()
shouldWait
protected boolean shouldWait(javax.servlet.http.HttpServletRequest request)
isSSERequest
protected boolean isSSERequest(javax.servlet.http.HttpServletRequest request)
prepareCometPoll
protected void prepareCometPoll(javax.servlet.http.HttpServletResponse response)
prepareSSE
protected void prepareSSE(javax.servlet.http.HttpServletResponse response)
throws IOException
- Throws:
IOException
prepareSSEContinue
protected void prepareSSEContinue(javax.servlet.http.HttpServletResponse response)
throws IOException
- Throws:
IOException
Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.