public interface WebSocketContext
Modifier and Type | Method and Description |
---|---|
void |
close()
gracefully close the connection, waiting for unread messages.
|
void |
close(int code,
java.lang.String message)
gracefully close the connection, waiting for unread messages.
|
<T> java.util.concurrent.BlockingQueue<T> |
createOutputQueue(WebSocketEncoder<T> encoder)
Creates a thread-safe queue, which applications can send objects to be
marshaled.
|
void |
disconnect()
Disconnect the connection.
|
void |
flush()
flushes the output stream
|
long |
getTimeout()
Gets the read timeout.
|
boolean |
isAutoFlush()
returns the current flush mode.
|
void |
onClose(int closeCode,
java.lang.String closeMessage) |
void |
pong(byte[] value)
sends a pong message
|
void |
setAutoFlush(boolean isAutoFlush)
auto-flush after each message is sent.
|
void |
setTimeout(long timeout)
Sets the read timeout.
|
java.io.OutputStream |
startBinaryMessage()
Returns the output stream for a binary message.
|
java.io.PrintWriter |
startTextMessage()
Returns the output stream for a binary message.
|
<T> java.util.concurrent.BlockingQueue<T> createOutputQueue(WebSocketEncoder<T> encoder)
java.io.OutputStream startBinaryMessage() throws java.io.IOException
java.io.IOException
java.io.PrintWriter startTextMessage() throws java.io.IOException
java.io.IOException
void setTimeout(long timeout)
long getTimeout()
void setAutoFlush(boolean isAutoFlush)
boolean isAutoFlush()
void flush() throws java.io.IOException
java.io.IOException
void close()
void close(int code, java.lang.String message)
void pong(byte[] value) throws java.io.IOException
java.io.IOException
void disconnect()
void onClose(int closeCode, java.lang.String closeMessage)
closeCode
- closeMessage
-