Package jakarta.websocket
Interface RemoteEndpoint.Async
- All Superinterfaces:
- RemoteEndpoint
- Enclosing interface:
- RemoteEndpoint
- 
Nested Class SummaryNested classes/interfaces inherited from interface jakarta.websocket.RemoteEndpointRemoteEndpoint.Async, RemoteEndpoint.Basic
- 
Method SummaryModifier and TypeMethodDescriptionlongObtain the timeout (in milliseconds) for sending a message asynchronously.sendBinary(ByteBuffer data) Send the message asynchronously, using the Future to signal to the client when the message has been sent.voidsendBinary(ByteBuffer data, SendHandler completion) Send the message asynchronously, using the SendHandler to signal to the client when the message has been sent.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.voidsendObject(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.Send the message asynchronously, using the Future to signal to the client when the message has been sent.voidsendText(String text, SendHandler completion) Send the message asynchronously, using the SendHandler to signal to the client when the message has been sent.voidsetSendTimeout(long timeout) Set the timeout (in milliseconds) for sending a message asynchronously.Methods inherited from interface jakarta.websocket.RemoteEndpointflushBatch, getBatchingAllowed, sendPing, sendPong, setBatchingAllowed
- 
Method Details- 
getSendTimeoutlong getSendTimeout()Obtain the timeout (in milliseconds) for sending a message asynchronously. The default value is determined byWebSocketContainer.getDefaultAsyncSendTimeout().- Returns:
- The current send timeout in milliseconds. A non-positive value means an infinite timeout.
 
- 
setSendTimeoutvoid setSendTimeout(long timeout) Set the timeout (in milliseconds) for sending a message asynchronously. The default value is determined byWebSocketContainer.getDefaultAsyncSendTimeout().- Parameters:
- timeout- The new timeout for sending messages asynchronously in milliseconds. A non-positive value means an infinite timeout.
 
- 
sendTextSend the message asynchronously, using the SendHandler to signal to the client when the message has been sent.- Parameters:
- text- The text message to send
- completion- Used to signal to the client when the message has been sent
 
- 
sendTextSend the message asynchronously, using the Future to signal to the client when the message has been sent.- Parameters:
- text- The text message to send
- Returns:
- A Future that signals when the message has been sent.
 
- 
sendBinarySend the message asynchronously, using the Future to signal to the client when the message has been sent.- Parameters:
- data- The text message to send
- Returns:
- A Future that signals when the message has been sent.
- Throws:
- IllegalArgumentException- if- datais- null.
 
- 
sendBinarySend the message asynchronously, using the SendHandler to signal to the client when the message has been sent.- Parameters:
- data- The text message to send
- completion- Used to signal to the client when the message has been sent
- Throws:
- IllegalArgumentException- if- dataor- completionis- null.
 
- 
sendObjectEncodes object as a message and sends it asynchronously, using the Future to signal to the client when the message has been sent.- Parameters:
- obj- The object to be sent.
- Returns:
- A Future that signals when the message has been sent.
- Throws:
- IllegalArgumentException- if- objis- null.
 
- 
sendObjectEncodes object as a message and sends it asynchronously, using the SendHandler to signal to the client when the message has been sent.- Parameters:
- obj- The object to be sent.
- completion- Used to signal to the client when the message has been sent
- Throws:
- IllegalArgumentException- if- objor- completionis- null.
 
 
-