Package org.atmosphere.cpr
Class AsyncIOWriterAdapter
- java.lang.Object
-
- org.atmosphere.cpr.AsyncIOWriterAdapter
-
- All Implemented Interfaces:
AsyncIOWriter
- Direct Known Subclasses:
AtmosphereInterceptorWriter,ByteArrayAsyncWriter
public class AsyncIOWriterAdapter extends java.lang.Object implements AsyncIOWriter
Adapter class forAsyncIOWriter.- Author:
- Jeanfrancois Arcand
-
-
Constructor Summary
Constructors Constructor Description AsyncIOWriterAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose(AtmosphereResponse r)Close the underlying connection.AsyncIOWriterflush(AtmosphereResponse r)Flush the buffered content.AsyncIOWriterredirect(AtmosphereResponse r, java.lang.String location)Redirect a WebSocket request to another location.AsyncIOWriterwrite(AtmosphereResponse r, byte[] data)Write a WebSocket message.AsyncIOWriterwrite(AtmosphereResponse r, byte[] data, int offset, int length)Write a WebSocket message.AsyncIOWriterwrite(AtmosphereResponse r, java.lang.String data)Write a WebSocket message.AsyncIOWriterwriteError(AtmosphereResponse r, int errorCode, java.lang.String message)Write an error code.
-
-
-
Method Detail
-
redirect
public AsyncIOWriter redirect(AtmosphereResponse r, java.lang.String location) throws java.io.IOException
Description copied from interface:AsyncIOWriterRedirect a WebSocket request to another location.- Specified by:
redirectin interfaceAsyncIOWriter- Throws:
java.io.IOException
-
writeError
public AsyncIOWriter writeError(AtmosphereResponse r, int errorCode, java.lang.String message) throws java.io.IOException
Description copied from interface:AsyncIOWriterWrite an error code.- Specified by:
writeErrorin interfaceAsyncIOWritererrorCode- the error code- Throws:
java.io.IOException
-
write
public AsyncIOWriter write(AtmosphereResponse r, java.lang.String data) throws java.io.IOException
Description copied from interface:AsyncIOWriterWrite a WebSocket message.- Specified by:
writein interfaceAsyncIOWriterdata- the WebSocket message- Throws:
java.io.IOException
-
write
public AsyncIOWriter write(AtmosphereResponse r, byte[] data) throws java.io.IOException
Description copied from interface:AsyncIOWriterWrite a WebSocket message.- Specified by:
writein interfaceAsyncIOWriterdata- the WebSocket message- Throws:
java.io.IOException
-
write
public AsyncIOWriter write(AtmosphereResponse r, byte[] data, int offset, int length) throws java.io.IOException
Description copied from interface:AsyncIOWriterWrite a WebSocket message.- Specified by:
writein interfaceAsyncIOWriterdata- the WebSocket messageoffset- offset of the messagelength- length of the message- Throws:
java.io.IOException
-
close
public void close(AtmosphereResponse r) throws java.io.IOException
Description copied from interface:AsyncIOWriterClose the underlying connection.- Specified by:
closein interfaceAsyncIOWriter- Throws:
java.io.IOException
-
flush
public AsyncIOWriter flush(AtmosphereResponse r) throws java.io.IOException
Description copied from interface:AsyncIOWriterFlush the buffered content.- Specified by:
flushin interfaceAsyncIOWriter- Throws:
java.io.IOException
-
-