|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.atmosphere.cpr.AsyncIOWriterAdapter
org.atmosphere.cpr.AtmosphereInterceptorWriter
public class AtmosphereInterceptorWriter
An AsyncIOWriter that delegates the write operation to it's AsyncIOInterceptor. If no
AsyncIOInterceptor are specified, this class does nothing and the response's will never get written.
| Field Summary | |
|---|---|
protected LinkedList<AsyncIOInterceptor> |
filters
|
| Constructor Summary | |
|---|---|
AtmosphereInterceptorWriter()
|
|
| Method Summary | |
|---|---|
void |
close(AtmosphereResponse response)
No OPS |
AsyncIOWriter |
flush(AtmosphereResponse response)
No OPS |
AtmosphereInterceptorWriter |
interceptor(AsyncIOInterceptor filter)
Add an AsyncIOInterceptor that will be invoked in the order it was added. |
protected void |
invokeInterceptor(AtmosphereResponse response,
byte[] data,
int offset,
int length)
|
AsyncIOWriter |
redirect(AtmosphereResponse response,
String location)
No OPS |
AsyncIOWriter |
write(AtmosphereResponse response,
byte[] data)
No OPS |
AsyncIOWriter |
write(AtmosphereResponse response,
byte[] data,
int offset,
int length)
No OPS |
AsyncIOWriter |
write(AtmosphereResponse response,
String data)
No OPS |
AsyncIOWriter |
writeError(AtmosphereResponse response,
int errorCode,
String message)
No OPS |
protected void |
writeReady(AtmosphereResponse response,
byte[] responseDraft)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final LinkedList<AsyncIOInterceptor> filters
| Constructor Detail |
|---|
public AtmosphereInterceptorWriter()
| Method Detail |
|---|
public AsyncIOWriter redirect(AtmosphereResponse response,
String location)
throws IOException
AsyncIOWriterAdapter
redirect in interface AsyncIOWriterredirect in class AsyncIOWriterAdapterIOException
public AsyncIOWriter writeError(AtmosphereResponse response,
int errorCode,
String message)
throws IOException
AsyncIOWriterAdapter
writeError in interface AsyncIOWriterwriteError in class AsyncIOWriterAdaptererrorCode - the error code
IOException
public AsyncIOWriter write(AtmosphereResponse response,
String data)
throws IOException
AsyncIOWriterAdapter
write in interface AsyncIOWriterwrite in class AsyncIOWriterAdapterdata - the WebSocket message
IOException
public AsyncIOWriter write(AtmosphereResponse response,
byte[] data)
throws IOException
AsyncIOWriterAdapter
write in interface AsyncIOWriterwrite in class AsyncIOWriterAdapterdata - the WebSocket message
IOException
public AsyncIOWriter write(AtmosphereResponse response,
byte[] data,
int offset,
int length)
throws IOException
AsyncIOWriterAdapter
write in interface AsyncIOWriterwrite in class AsyncIOWriterAdapterdata - the WebSocket messageoffset - offset of the messagelength - length if the message
IOException
protected void invokeInterceptor(AtmosphereResponse response,
byte[] data,
int offset,
int length)
throws IOException
IOException
protected void writeReady(AtmosphereResponse response,
byte[] responseDraft)
throws IOException
IOException
public void close(AtmosphereResponse response)
throws IOException
AsyncIOWriterAdapter
close in interface AsyncIOWriterclose in class AsyncIOWriterAdapterIOException
public AsyncIOWriter flush(AtmosphereResponse response)
throws IOException
AsyncIOWriterAdapter
flush in interface AsyncIOWriterflush in class AsyncIOWriterAdapterIOExceptionpublic AtmosphereInterceptorWriter interceptor(AsyncIOInterceptor filter)
AsyncIOInterceptor that will be invoked in the order it was added.
filter - {@link AsyncIOInterceptor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||