public class WsRemoteEndpointAsync extends WsRemoteEndpointBase implements RemoteEndpoint.Async
RemoteEndpoint.Async, RemoteEndpoint.Basic
base
Modifier and Type | Method and Description |
---|---|
long |
getSendTimeout()
Obtain the timeout (in milliseconds) for sending a message
asynchronously.
|
Future<Void> |
sendBinary(ByteBuffer data)
Send the message asynchronously, using the Future to signal to the client
when the message has been sent.
|
void |
sendBinary(ByteBuffer data,
SendHandler completion)
Send the message asynchronously, using the SendHandler to signal to the
client when the message has been sent.
|
Future<Void> |
sendObject(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(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.
|
Future<Void> |
sendText(String text)
Send the message asynchronously, using the Future to signal to the
client when the message has been sent.
|
void |
sendText(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, setBatchingAllowed
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
flushBatch, getBatchingAllowed, sendPing, sendPong, setBatchingAllowed
public long getSendTimeout()
RemoteEndpoint.Async
WebSocketContainer.getDefaultAsyncSendTimeout()
.getSendTimeout
in interface RemoteEndpoint.Async
public void setSendTimeout(long timeout)
RemoteEndpoint.Async
WebSocketContainer.getDefaultAsyncSendTimeout()
.setSendTimeout
in interface RemoteEndpoint.Async
timeout
- The new timeout for sending messages asynchronously
in milliseconds. A non-positive value means an
infinite timeout.public void sendText(String text, SendHandler completion)
RemoteEndpoint.Async
sendText
in interface RemoteEndpoint.Async
text
- The text message to sendcompletion
- Used to signal to the client when the message has
been sentpublic Future<Void> sendText(String text)
RemoteEndpoint.Async
sendText
in interface RemoteEndpoint.Async
text
- The text message to sendpublic Future<Void> sendBinary(ByteBuffer data)
RemoteEndpoint.Async
sendBinary
in interface RemoteEndpoint.Async
data
- The text message to sendpublic void sendBinary(ByteBuffer data, SendHandler completion)
RemoteEndpoint.Async
sendBinary
in interface RemoteEndpoint.Async
data
- The text message to sendcompletion
- Used to signal to the client when the message has
been sentpublic Future<Void> sendObject(Object obj)
RemoteEndpoint.Async
sendObject
in interface RemoteEndpoint.Async
obj
- The object to be sent.public void sendObject(Object obj, SendHandler completion)
RemoteEndpoint.Async
sendObject
in interface RemoteEndpoint.Async
obj
- The object to be sent.completion
- Used to signal to the client when the message has
been sentCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.