Top Fields Constructors Methods
org.apache.tomcat.websocket

public Class WsRemoteEndpointAsync

extends WsRemoteEndpointBase
implements Async
Class Inheritance
All Implemented Interfaces
jakarta.websocket.RemoteEndpoint.Async, jakarta.websocket.RemoteEndpoint
Imports
java.nio.ByteBuffer, java.util.concurrent.Future, jakarta.websocket.RemoteEndpoint, .SendHandler

Field Summary

Inherited from org.apache.tomcat.websocket.WsRemoteEndpointBase:
base

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public long
getSendTimeout()

Implements jakarta.websocket.RemoteEndpoint.Async.getSendTimeout.

Obtain the timeout (in milliseconds) for sending a message asynchronously.

public Future<Void>
sendBinary(ByteBuffer
The text message to send
data
)

Implements jakarta.websocket.RemoteEndpoint.Async.sendBinary.

Send the message asynchronously, using the Future to signal to the client when the message has been sent.

public void
sendBinary(ByteBuffer
The text message to send
data
,
SendHandler
Used to signal to the client when the message has been sent
completion
)

Implements jakarta.websocket.RemoteEndpoint.Async.sendBinary.

Send the message asynchronously, using the SendHandler to signal to the client when the message has been sent.

public Future<Void>
sendObject(Object
The object to be sent.
obj
)

Implements jakarta.websocket.RemoteEndpoint.Async.sendObject.

Encodes object as a message and sends it asynchronously, using the Future to signal to the client when the message has been sent.

public void
sendObject(Object
The object to be sent.
obj
,
SendHandler
Used to signal to the client when the message has been sent
completion
)

Implements jakarta.websocket.RemoteEndpoint.Async.sendObject.

Encodes object as a message and sends it asynchronously, using the SendHandler to signal to the client when the message has been sent.

public void
sendText(String
The text message to send
text
,
SendHandler
Used to signal to the client when the message has been sent
completion
)

Implements jakarta.websocket.RemoteEndpoint.Async.sendText.

Send the message asynchronously, using the SendHandler to signal to the client when the message has been sent.

public Future<Void>
sendText(String
The text message to send
text
)

Implements jakarta.websocket.RemoteEndpoint.Async.sendText.

Send the message asynchronously, using the Future to signal to the client when the message has been sent.

public void
setSendTimeout(long
The new timeout for sending messages asynchronously in milliseconds. A non-positive value means an infinite timeout.
timeout
)

Implements jakarta.websocket.RemoteEndpoint.Async.setSendTimeout.

Set the timeout (in milliseconds) for sending a message asynchronously.

Inherited from org.apache.tomcat.websocket.WsRemoteEndpointBase:
flushBatchgetBatchingAllowedsendPingsendPongsetBatchingAllowed

Constructor Detail

WsRemoteEndpointAsyncback to summary
pack-priv WsRemoteEndpointAsync(WsRemoteEndpointImplBase base)

Method Detail

getSendTimeoutback to summary
public long getSendTimeout()

Implements jakarta.websocket.RemoteEndpoint.Async.getSendTimeout.

Doc from jakarta.websocket.RemoteEndpoint.Async.getSendTimeout.

Obtain the timeout (in milliseconds) for sending a message asynchronously. The default value is determined by WebSocketContainer#getDefaultAsyncSendTimeout().

Returns:long

The current send timeout in milliseconds. A non-positive value means an infinite timeout.

Annotations
@Override
sendBinaryback to summary
public Future<Void> sendBinary(ByteBuffer data)

Implements jakarta.websocket.RemoteEndpoint.Async.sendBinary.

Doc from jakarta.websocket.RemoteEndpoint.Async.sendBinary.

Send the message asynchronously, using the Future to signal to the client when the message has been sent.

Parameters
data:ByteBuffer

The text message to send

Returns:Future<Void>

A Future that signals when the message has been sent.

Annotations
@Override
sendBinaryback to summary
public void sendBinary(ByteBuffer data, SendHandler completion)

Implements jakarta.websocket.RemoteEndpoint.Async.sendBinary.

Doc from jakarta.websocket.RemoteEndpoint.Async.sendBinary.

Send the message asynchronously, using the SendHandler to signal to the client when the message has been sent.

Parameters
data:ByteBuffer

The text message to send

completion:SendHandler

Used to signal to the client when the message has been sent

Annotations
@Override
sendObjectback to summary
public Future<Void> sendObject(Object obj)

Implements jakarta.websocket.RemoteEndpoint.Async.sendObject.

Doc from jakarta.websocket.RemoteEndpoint.Async.sendObject.

Encodes object as a message and sends it asynchronously, using the Future to signal to the client when the message has been sent.

Parameters
obj:Object

The object to be sent.

Returns:Future<Void>

A Future that signals when the message has been sent.

Annotations
@Override
sendObjectback to summary
public void sendObject(Object obj, SendHandler completion)

Implements jakarta.websocket.RemoteEndpoint.Async.sendObject.

Doc from jakarta.websocket.RemoteEndpoint.Async.sendObject.

Encodes object as a message and sends it asynchronously, using the SendHandler to signal to the client when the message has been sent.

Parameters
obj:Object

The object to be sent.

completion:SendHandler

Used to signal to the client when the message has been sent

Annotations
@Override
sendTextback to summary
public void sendText(String text, SendHandler completion)

Implements jakarta.websocket.RemoteEndpoint.Async.sendText.

Doc from jakarta.websocket.RemoteEndpoint.Async.sendText.

Send the message asynchronously, using the SendHandler to signal to the client when the message has been sent.

Parameters
text:String

The text message to send

completion:SendHandler

Used to signal to the client when the message has been sent

Annotations
@Override
sendTextback to summary
public Future<Void> sendText(String text)

Implements jakarta.websocket.RemoteEndpoint.Async.sendText.

Doc from jakarta.websocket.RemoteEndpoint.Async.sendText.

Send the message asynchronously, using the Future to signal to the client when the message has been sent.

Parameters
text:String

The text message to send

Returns:Future<Void>

A Future that signals when the message has been sent.

Annotations
@Override
setSendTimeoutback to summary
public void setSendTimeout(long timeout)

Implements jakarta.websocket.RemoteEndpoint.Async.setSendTimeout.

Doc from jakarta.websocket.RemoteEndpoint.Async.setSendTimeout.

Set the timeout (in milliseconds) for sending a message asynchronously. The default value is determined by WebSocketContainer#getDefaultAsyncSendTimeout().

Parameters
timeout:long

The new timeout for sending messages asynchronously in milliseconds. A non-positive value means an infinite timeout.

Annotations
@Override