org.atmosphere.cpr
Class AsyncIOWriterAdapter

java.lang.Object
  extended by org.atmosphere.cpr.AsyncIOWriterAdapter
All Implemented Interfaces:
AsyncIOWriter
Direct Known Subclasses:
AtmosphereInterceptorWriter, ByteArrayAsyncWriter

public class AsyncIOWriterAdapter
extends Object
implements AsyncIOWriter

Adapter class for AsyncIOWriter.

Author:
Jeanfrancois Arcand

Constructor Summary
AsyncIOWriterAdapter()
           
 
Method Summary
 void close(AtmosphereResponse r)
          Close the underlying connection.
 AsyncIOWriter flush(AtmosphereResponse r)
          Flush the buffered content.
 AsyncIOWriter redirect(AtmosphereResponse r, String location)
          Redirect a WebSocket request to another location.
 AsyncIOWriter write(AtmosphereResponse r, byte[] data)
          Write a WebSocket message.
 AsyncIOWriter write(AtmosphereResponse r, byte[] data, int offset, int length)
          Write a WebSocket message.
 AsyncIOWriter write(AtmosphereResponse r, String data)
          Write a WebSocket message.
 AsyncIOWriter writeError(AtmosphereResponse r, int errorCode, String message)
          Write an error code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncIOWriterAdapter

public AsyncIOWriterAdapter()
Method Detail

redirect

public AsyncIOWriter redirect(AtmosphereResponse r,
                              String location)
                       throws IOException
Description copied from interface: AsyncIOWriter
Redirect a WebSocket request to another location.

Specified by:
redirect in interface AsyncIOWriter
Throws:
IOException

writeError

public AsyncIOWriter writeError(AtmosphereResponse r,
                                int errorCode,
                                String message)
                         throws IOException
Description copied from interface: AsyncIOWriter
Write an error code.

Specified by:
writeError in interface AsyncIOWriter
errorCode - the error code
Throws:
IOException

write

public AsyncIOWriter write(AtmosphereResponse r,
                           String data)
                    throws IOException
Description copied from interface: AsyncIOWriter
Write a WebSocket message.

Specified by:
write in interface AsyncIOWriter
data - the WebSocket message
Throws:
IOException

write

public AsyncIOWriter write(AtmosphereResponse r,
                           byte[] data)
                    throws IOException
Description copied from interface: AsyncIOWriter
Write a WebSocket message.

Specified by:
write in interface AsyncIOWriter
data - the WebSocket message
Throws:
IOException

write

public AsyncIOWriter write(AtmosphereResponse r,
                           byte[] data,
                           int offset,
                           int length)
                    throws IOException
Description copied from interface: AsyncIOWriter
Write a WebSocket message.

Specified by:
write in interface AsyncIOWriter
data - the WebSocket message
offset - offset of the message
length - length of the message
Throws:
IOException

close

public void close(AtmosphereResponse r)
           throws IOException
Description copied from interface: AsyncIOWriter
Close the underlying connection.

Specified by:
close in interface AsyncIOWriter
Throws:
IOException

flush

public AsyncIOWriter flush(AtmosphereResponse r)
                    throws IOException
Description copied from interface: AsyncIOWriter
Flush the buffered content.

Specified by:
flush in interface AsyncIOWriter
Throws:
IOException


Copyright © 2014. All Rights Reserved.