|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.atmosphere.gwt.server.impl.GwtResponseWriterImpl
public abstract class GwtResponseWriterImpl
| Field Summary | |
|---|---|
protected int |
connectionID
|
protected org.slf4j.Logger |
logger
|
protected GwtAtmosphereResourceImpl |
resource
|
protected Writer |
writer
|
| Constructor Summary | |
|---|---|
protected |
GwtResponseWriterImpl(GwtAtmosphereResourceImpl resource,
com.google.gwt.user.server.rpc.SerializationPolicy serializationPolicy,
com.google.gwt.rpc.server.ClientOracle clientOracle)
|
| Method Summary | |
|---|---|
protected abstract void |
doHeartbeat()
|
protected abstract void |
doSendError(int statusCode,
String message)
|
protected abstract void |
doSuspend()
|
protected abstract void |
doTerminate()
|
protected abstract void |
doWrite(List<? extends Serializable> messages)
|
long |
getLastWriteTime()
Returns the last time a write has been performed |
protected OutputStream |
getOutputStream(OutputStream outputStream)
|
javax.servlet.http.HttpServletRequest |
getRequest()
|
javax.servlet.http.HttpServletResponse |
getResponse()
|
protected boolean |
hasSession()
|
void |
heartbeat()
Write a heartbeat message to the associated HTTP response. |
void |
initiate()
|
protected boolean |
isDeRPC()
|
boolean |
isTerminated()
Test if this Comet response has been terminated by calling the GwtResponseWriter.terminate() method or terminated from the
HTTP client disconnecting. |
void |
sendError(int statusCode)
Send an error before the response is sent. |
void |
sendError(int statusCode,
String message)
Send an error before the response is sent. |
protected String |
serialize(Serializable message)
|
void |
suspend()
|
void |
terminate()
Write a terminate message to the associated HTTP response and close the HTTP output stream/ |
void |
write(List<? extends Serializable> messages)
Write a list of message to the associated HTTP response. |
void |
write(List<? extends Serializable> messages,
boolean flush)
Write a list of message to the associated HTTP response. |
void |
write(Serializable message)
Write a single message to the associated HTTP response. |
void |
write(Serializable message,
boolean flush)
Write a single message to the associated HTTP response. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Writer writer
protected final GwtAtmosphereResourceImpl resource
protected final int connectionID
protected final org.slf4j.Logger logger
| Constructor Detail |
|---|
protected GwtResponseWriterImpl(GwtAtmosphereResourceImpl resource,
com.google.gwt.user.server.rpc.SerializationPolicy serializationPolicy,
com.google.gwt.rpc.server.ClientOracle clientOracle)
| Method Detail |
|---|
public boolean isTerminated()
GwtResponseWriterGwtResponseWriter.terminate() method or terminated from the
HTTP client disconnecting.
isTerminated in interface GwtResponseWriterprotected boolean isDeRPC()
public javax.servlet.http.HttpServletRequest getRequest()
public javax.servlet.http.HttpServletResponse getResponse()
public void sendError(int statusCode)
throws IOException
GwtResponseWriter
sendError in interface GwtResponseWriterIOException
public void sendError(int statusCode,
String message)
throws IOException
GwtResponseWriter
sendError in interface GwtResponseWriterIOExceptionprotected OutputStream getOutputStream(OutputStream outputStream)
public void initiate()
throws IOException
IOException
public void suspend()
throws IOException
IOException
public void terminate()
throws IOException
GwtResponseWriter
terminate in interface GwtResponseWriterIOException
public void write(Serializable message)
throws IOException
GwtResponseWriter
write in interface GwtResponseWriterIOException
public void write(Serializable message,
boolean flush)
throws IOException
GwtResponseWriter
write in interface GwtResponseWriterIOException
public void write(List<? extends Serializable> messages)
throws IOException
GwtResponseWriter
write in interface GwtResponseWriterIOException
public void write(List<? extends Serializable> messages,
boolean flush)
throws IOException
GwtResponseWriter
write in interface GwtResponseWriterIOException
public void heartbeat()
throws IOException
GwtResponseWriter
heartbeat in interface GwtResponseWriterIOExceptionpublic long getLastWriteTime()
GwtResponseWriter
getLastWriteTime in interface GwtResponseWriter
protected abstract void doSendError(int statusCode,
String message)
throws IOException
IOException
protected abstract void doSuspend()
throws IOException
IOException
protected abstract void doWrite(List<? extends Serializable> messages)
throws IOException
IOException
protected abstract void doHeartbeat()
throws IOException
IOException
protected abstract void doTerminate()
throws IOException
IOExceptionprotected boolean hasSession()
protected String serialize(Serializable message)
throws NotSerializableException,
UnsupportedEncodingException
NotSerializableException
UnsupportedEncodingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||