public abstract class AbstractErraiServlet
extends javax.servlet.http.HttpServlet
Modifier and Type | Class and Description |
---|---|
static class |
AbstractErraiServlet.ConnectionPhase |
Modifier and Type | Field and Description |
---|---|
protected ErraiService |
service |
protected SessionProvider<javax.servlet.http.HttpSession> |
sessionProvider |
protected byte[] |
SSE_TERMINATION_BYTES |
Constructor and Description |
---|
AbstractErraiServlet() |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
protected static String |
getClientId(javax.servlet.http.HttpServletRequest request) |
static AbstractErraiServlet.ConnectionPhase |
getConnectionPhase(javax.servlet.http.HttpServletRequest request) |
protected int |
getLongPollTimeout() |
protected int |
getSSETimeout() |
void |
init(javax.servlet.ServletConfig config) |
void |
initAsFilter(javax.servlet.FilterConfig config) |
boolean |
isLongPollingEnabled() |
protected boolean |
isSSERequest(javax.servlet.http.HttpServletRequest request) |
protected void |
prepareCometPoll(javax.servlet.http.HttpServletResponse response) |
protected void |
prepareSSE(javax.servlet.http.HttpServletResponse response) |
protected void |
prepareSSEContinue(javax.servlet.http.HttpServletResponse response) |
protected void |
sendDisconnectDueToSessionExpiry(javax.servlet.http.HttpServletResponse response) |
protected void |
sendDisconnectWithReason(OutputStream stream,
String reason) |
protected boolean |
shouldWait(javax.servlet.http.HttpServletRequest request) |
protected void |
writeExceptionToOutputStream(javax.servlet.http.HttpServletResponse httpServletResponse,
Throwable t) |
static void |
writeToOutputStream(OutputStream stream,
String encodedMessage)
Writes the message to the output stream
|
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
protected final byte[] SSE_TERMINATION_BYTES
protected ErraiService service
protected SessionProvider<javax.servlet.http.HttpSession> sessionProvider
public static AbstractErraiServlet.ConnectionPhase getConnectionPhase(javax.servlet.http.HttpServletRequest request)
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
init
in interface javax.servlet.Servlet
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
public void initAsFilter(javax.servlet.FilterConfig config) throws javax.servlet.ServletException
javax.servlet.ServletException
public void destroy()
destroy
in interface javax.servlet.Servlet
destroy
in class javax.servlet.GenericServlet
public static void writeToOutputStream(OutputStream stream, String encodedMessage) throws IOException
stream
- - the stream to write toencodedMessage
- - the message to write to the streamIOException
- - is thrown if any input/output errors occur while writing to the streamprotected void writeExceptionToOutputStream(javax.servlet.http.HttpServletResponse httpServletResponse, Throwable t) throws IOException
IOException
protected void sendDisconnectWithReason(OutputStream stream, String reason) throws IOException
IOException
protected void sendDisconnectDueToSessionExpiry(javax.servlet.http.HttpServletResponse response) throws IOException
IOException
protected static String getClientId(javax.servlet.http.HttpServletRequest request)
protected int getLongPollTimeout()
protected final int getSSETimeout()
public boolean isLongPollingEnabled()
protected boolean shouldWait(javax.servlet.http.HttpServletRequest request)
protected boolean isSSERequest(javax.servlet.http.HttpServletRequest request)
protected void prepareCometPoll(javax.servlet.http.HttpServletResponse response)
protected void prepareSSE(javax.servlet.http.HttpServletResponse response) throws IOException
IOException
protected void prepareSSEContinue(javax.servlet.http.HttpServletResponse response) throws IOException
IOException
Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.