org.atmosphere.cpr
Interface AsyncIOWriter

All Known Subinterfaces:
WebSocket
All Known Implementing Classes:
GrizzlyWebSocket, Jetty8WebSocket, TomcatWebSocket, WebSocketAdapter

public interface AsyncIOWriter

An Asynchronous I/O Writer is used by a AtmosphereResponse when writing data.


Method Summary
 void close()
          Close the underlying connection.
 void flush()
          Flush the buffered content
 void redirect(String location)
          Redirect a WebSocket request to another location
 void write(byte[] data)
          Write a WebSocket message
 void write(byte[] data, int offset, int length)
          Write a WebSocket message
 void write(String data)
          Write a WebSocket message
 void writeError(int errorCode, String message)
          Write an error code
 

Method Detail

redirect

void redirect(String location)
              throws IOException
Redirect a WebSocket request to another location

Parameters:
location -
Throws:
IOException

writeError

void writeError(int errorCode,
                String message)
                throws IOException
Write an error code

Parameters:
errorCode - the error code
message -
Throws:
IOException

write

void write(String data)
           throws IOException
Write a WebSocket message

Parameters:
data - the WebSocket message
Throws:
IOException

write

void write(byte[] data)
           throws IOException
Write a WebSocket message

Parameters:
data - the WebSocket message
Throws:
IOException

write

void write(byte[] data,
           int offset,
           int length)
           throws IOException
Write a WebSocket message

Parameters:
data - the WebSocket message
offset - offset of the message
length - length if the message
Throws:
IOException

close

void close()
           throws IOException
Close the underlying connection.

Throws:
IOException

flush

void flush()
           throws IOException
Flush the buffered content

Throws:
IOException


Copyright © 2012. All Rights Reserved.