public static interface RemoteEndpoint.Async extends RemoteEndpoint
RemoteEndpoint.Async, RemoteEndpoint.Basic| Modifier and Type | Method and Description |
|---|---|
long |
getSendTimeout()
Return the number of milliseconds the implementation will timeout attempting to send a websocket message.
|
java.util.concurrent.Future<java.lang.Void> |
sendBinary(java.nio.ByteBuffer data)
Initiates the asynchronous transmission of a binary message.
|
void |
sendBinary(java.nio.ByteBuffer data,
SendHandler handler)
Initiates the asynchronous transmission of a binary message.
|
java.util.concurrent.Future<java.lang.Void> |
sendObject(java.lang.Object data)
Initiates the asynchronous transmission of a custom developer object.
|
void |
sendObject(java.lang.Object data,
SendHandler handler)
Initiates the asynchronous transmission of a custom developer object.
|
java.util.concurrent.Future<java.lang.Void> |
sendText(java.lang.String text)
Initiates the asynchronous transmission of a text message.
|
void |
sendText(java.lang.String text,
SendHandler handler)
Initiates the asynchronous transmission of a text message.
|
void |
setSendTimeout(long timeoutmillis)
Sets the number of milliseconds the implementation will timeout attempting to send a websocket message.
|
flushBatch, getBatchingAllowed, sendPing, sendPong, setBatchingAllowedlong getSendTimeout()
void setSendTimeout(long timeoutmillis)
timeoutmillis - The number of milliseconds this RemoteEndpoint will wait before timing out an incomplete
asynchronous message send.void sendText(java.lang.String text,
SendHandler handler)
text - the text being sent.handler - the handler which will be notified of progress.java.lang.IllegalArgumentException - if the text or the handler is null.java.util.concurrent.Future<java.lang.Void> sendText(java.lang.String text)
null upon successful completion. Errors in transmission are wrapped in the
ExecutionException thrown when querying the Future object.text - the text being sent.java.lang.IllegalArgumentException - if the text is null.java.util.concurrent.Future<java.lang.Void> sendBinary(java.nio.ByteBuffer data)
null upon successful completion. Errors in transmission are wrapped in the
ExecutionException thrown when querying the Future object.data - the data being sent.java.lang.IllegalArgumentException - if the data is null.void sendBinary(java.nio.ByteBuffer data,
SendHandler handler)
data - the data being sent, must not be null.handler - the handler that will be notified of progress, must not be null.java.lang.IllegalArgumentException - if either the data or the handler are null.java.util.concurrent.Future<java.lang.Void> sendObject(java.lang.Object data)
null upon successful completion. Errors in transmission are wrapped in the
ExecutionException thrown when querying the Future object.data - the object being sent.java.lang.IllegalArgumentException - if the data is null.void sendObject(java.lang.Object data,
SendHandler handler)
data - the object being sent.handler - the handler that will be notified of progress, must not be null.java.lang.IllegalArgumentException - if either the data or the handler are null.Copyright © 2012–2025 Oracle Corporation. All rights reserved.