public class WsRemoteEndpointAsync extends WsRemoteEndpointBase implements RemoteEndpoint.Async
RemoteEndpoint.Async, RemoteEndpoint.Basicbase| Modifier and Type | Method and Description |
|---|---|
long |
getSendTimeout()
Obtain the timeout (in milliseconds) for sending a message
asynchronously.
|
java.util.concurrent.Future<java.lang.Void> |
sendBinary(java.nio.ByteBuffer data)
Send the message asynchronously, using the Future to signal to the client
when the message has been sent.
|
void |
sendBinary(java.nio.ByteBuffer data,
SendHandler completion)
Send the message asynchronously, using the SendHandler to signal to the
client when the message has been sent.
|
java.util.concurrent.Future<java.lang.Void> |
sendObject(java.lang.Object obj)
Encodes object as a message and sends it asynchronously, using the
Future to signal to the client when the message has been sent.
|
void |
sendObject(java.lang.Object obj,
SendHandler completion)
Encodes object as a message and sends it asynchronously, using the
SendHandler to signal to the client when the message has been sent.
|
java.util.concurrent.Future<java.lang.Void> |
sendText(java.lang.String text)
Send the message asynchronously, using the Future to signal to the
client when the message has been sent.
|
void |
sendText(java.lang.String text,
SendHandler completion)
Send the message asynchronously, using the SendHandler to signal to the
client when the message has been sent.
|
void |
setSendTimeout(long timeout)
Set the timeout (in milliseconds) for sending a message
asynchronously.
|
flushBatch, getBatchingAllowed, sendPing, sendPong, setBatchingAllowedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitflushBatch, getBatchingAllowed, sendPing, sendPong, setBatchingAllowedpublic long getSendTimeout()
javax.websocket.RemoteEndpoint.AsyncWebSocketContainer.getDefaultAsyncSendTimeout().getSendTimeout in interface RemoteEndpoint.Asyncpublic void setSendTimeout(long timeout)
javax.websocket.RemoteEndpoint.AsyncWebSocketContainer.getDefaultAsyncSendTimeout().setSendTimeout in interface RemoteEndpoint.Asynctimeout - The new timeout for sending messages asynchronously
in milliseconds. A non-positive value means an
infinite timeout.public void sendText(java.lang.String text,
SendHandler completion)
javax.websocket.RemoteEndpoint.AsyncsendText in interface RemoteEndpoint.Asynctext - The text message to sendcompletion - Used to signal to the client when the message has
been sentpublic java.util.concurrent.Future<java.lang.Void> sendText(java.lang.String text)
javax.websocket.RemoteEndpoint.AsyncsendText in interface RemoteEndpoint.Asynctext - The text message to sendpublic java.util.concurrent.Future<java.lang.Void> sendBinary(java.nio.ByteBuffer data)
javax.websocket.RemoteEndpoint.AsyncsendBinary in interface RemoteEndpoint.Asyncdata - The text message to sendpublic void sendBinary(java.nio.ByteBuffer data,
SendHandler completion)
javax.websocket.RemoteEndpoint.AsyncsendBinary in interface RemoteEndpoint.Asyncdata - The text message to sendcompletion - Used to signal to the client when the message has
been sentpublic java.util.concurrent.Future<java.lang.Void> sendObject(java.lang.Object obj)
javax.websocket.RemoteEndpoint.AsyncsendObject in interface RemoteEndpoint.Asyncobj - The object to be sent.public void sendObject(java.lang.Object obj,
SendHandler completion)
javax.websocket.RemoteEndpoint.AsyncsendObject in interface RemoteEndpoint.Asyncobj - The object to be sent.completion - Used to signal to the client when the message has
been sentCopyright © 2000-2019 Apache Software Foundation. All Rights Reserved.