Package org.atmosphere.cpr
Interface AsyncIOWriter
- All Known Implementing Classes:
AsyncIOWriterAdapter,AtmosphereInterceptorWriter,ByteArrayAsyncWriter,JSR356WebSocket,WebSocket
public interface AsyncIOWriter
An Asynchronous I/O Writer is used by a
AtmosphereResponse when writing data.- Author:
- Jeanfrancois Arcand
-
Method Summary
Modifier and TypeMethodDescriptionvoidClose the underlying connection.Flush the buffered content.redirect(AtmosphereResponse r, String location) Redirect a WebSocket request to another location.write(AtmosphereResponse r, byte[] data) Write a WebSocket message.write(AtmosphereResponse r, byte[] data, int offset, int length) Write a WebSocket message.write(AtmosphereResponse r, String data) Write a WebSocket message.writeError(AtmosphereResponse r, int errorCode, String message) Write an error code.
-
Method Details
-
redirect
Redirect a WebSocket request to another location.- Parameters:
location-- Throws:
IOException
-
writeError
Write an error code.- Parameters:
errorCode- the error codemessage-- Throws:
IOException
-
write
Write a WebSocket message.- Parameters:
data- the WebSocket message- Throws:
IOException
-
write
Write a WebSocket message.- Parameters:
data- the WebSocket message- Throws:
IOException
-
write
Write a WebSocket message.- Parameters:
data- the WebSocket messageoffset- offset of the messagelength- length of the message- Throws:
IOException
-
close
Close the underlying connection.- Throws:
IOException
-
flush
Flush the buffered content.- Throws:
IOException
-