Package org.apache.tomcat.websocket
Class WsRemoteEndpointAsync
- java.lang.Object
- 
- org.apache.tomcat.websocket.WsRemoteEndpointBase
- 
- org.apache.tomcat.websocket.WsRemoteEndpointAsync
 
 
- 
- All Implemented Interfaces:
- RemoteEndpoint,- RemoteEndpoint.Async
 
 public class WsRemoteEndpointAsync extends WsRemoteEndpointBase implements RemoteEndpoint.Async 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface javax.websocket.RemoteEndpointRemoteEndpoint.Async, RemoteEndpoint.Basic
 
- 
 - 
Field Summary- 
Fields inherited from class org.apache.tomcat.websocket.WsRemoteEndpointBasebase
 
- 
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetSendTimeout()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.voidsendBinary(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.voidsendObject(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.voidsendText(java.lang.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 class org.apache.tomcat.websocket.WsRemoteEndpointBaseflushBatch, getBatchingAllowed, sendPing, sendPong, setBatchingAllowed
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface javax.websocket.RemoteEndpointflushBatch, getBatchingAllowed, sendPing, sendPong, setBatchingAllowed
 
- 
 
- 
- 
- 
Method Detail- 
getSendTimeoutpublic long getSendTimeout() Description copied from interface:javax.websocket.RemoteEndpoint.AsyncObtain the timeout (in milliseconds) for sending a message asynchronously. The default value is determined byWebSocketContainer.getDefaultAsyncSendTimeout().- Specified by:
- getSendTimeoutin interface- RemoteEndpoint.Async
- Returns:
- The current send timeout in milliseconds. A non-positive value means an infinite timeout.
 
 - 
setSendTimeoutpublic void setSendTimeout(long timeout) Description copied from interface:javax.websocket.RemoteEndpoint.AsyncSet the timeout (in milliseconds) for sending a message asynchronously. The default value is determined byWebSocketContainer.getDefaultAsyncSendTimeout().- Specified by:
- setSendTimeoutin interface- RemoteEndpoint.Async
- Parameters:
- timeout- The new timeout for sending messages asynchronously in milliseconds. A non-positive value means an infinite timeout.
 
 - 
sendTextpublic void sendText(java.lang.String text, SendHandler completion)Description copied from interface:javax.websocket.RemoteEndpoint.AsyncSend the message asynchronously, using the SendHandler to signal to the client when the message has been sent.- Specified by:
- sendTextin interface- RemoteEndpoint.Async
- Parameters:
- text- The text message to send
- completion- Used to signal to the client when the message has been sent
 
 - 
sendTextpublic java.util.concurrent.Future<java.lang.Void> sendText(java.lang.String text) Description copied from interface:javax.websocket.RemoteEndpoint.AsyncSend the message asynchronously, using the Future to signal to the client when the message has been sent.- Specified by:
- sendTextin interface- RemoteEndpoint.Async
- Parameters:
- text- The text message to send
- Returns:
- A Future that signals when the message has been sent.
 
 - 
sendBinarypublic java.util.concurrent.Future<java.lang.Void> sendBinary(java.nio.ByteBuffer data) Description copied from interface:javax.websocket.RemoteEndpoint.AsyncSend the message asynchronously, using the Future to signal to the client when the message has been sent.- Specified by:
- sendBinaryin interface- RemoteEndpoint.Async
- Parameters:
- data- The text message to send
- Returns:
- A Future that signals when the message has been sent.
 
 - 
sendBinarypublic void sendBinary(java.nio.ByteBuffer data, SendHandler completion)Description copied from interface:javax.websocket.RemoteEndpoint.AsyncSend the message asynchronously, using the SendHandler to signal to the client when the message has been sent.- Specified by:
- sendBinaryin interface- RemoteEndpoint.Async
- Parameters:
- data- The text message to send
- completion- Used to signal to the client when the message has been sent
 
 - 
sendObjectpublic java.util.concurrent.Future<java.lang.Void> sendObject(java.lang.Object obj) Description copied from interface:javax.websocket.RemoteEndpoint.AsyncEncodes object as a message and sends it asynchronously, using the Future to signal to the client when the message has been sent.- Specified by:
- sendObjectin interface- RemoteEndpoint.Async
- Parameters:
- obj- The object to be sent.
- Returns:
- A Future that signals when the message has been sent.
 
 - 
sendObjectpublic void sendObject(java.lang.Object obj, SendHandler completion)Description copied from interface:javax.websocket.RemoteEndpoint.AsyncEncodes object as a message and sends it asynchronously, using the SendHandler to signal to the client when the message has been sent.- Specified by:
- sendObjectin interface- RemoteEndpoint.Async
- Parameters:
- obj- The object to be sent.
- completion- Used to signal to the client when the message has been sent
 
 
- 
 
-