Top Fields Constructors Methods
org.apache.tomcat.websocket

public abstract Class WsRemoteEndpointBase

extends Object
implements RemoteEndpoint
Class Inheritance
All Implemented Interfaces
jakarta.websocket.RemoteEndpoint
Known Direct Subclasses
org.apache.tomcat.websocket.WsRemoteEndpointBasic, org.apache.tomcat.websocket.WsRemoteEndpointAsync
Imports
java.io.IOException, java.nio.ByteBuffer, jakarta.websocket.RemoteEndpoint

Field Summary

Modifier and TypeField and Description
protected final WsRemoteEndpointImplBase

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public final void
flushBatch()

Implements jakarta.websocket.RemoteEndpoint.flushBatch.

Flush any currently batched messages to the remote endpoint.

public final boolean
getBatchingAllowed()

Implements jakarta.websocket.RemoteEndpoint.getBatchingAllowed.

Obtains the current batching status of the endpoint.

public final void
sendPing(ByteBuffer
The payload for the ping message
applicationData
)

Implements jakarta.websocket.RemoteEndpoint.sendPing.

Send a ping message blocking until the message has been sent.

public final void
sendPong(ByteBuffer
The payload for the pong message
applicationData
)

Implements jakarta.websocket.RemoteEndpoint.sendPong.

Send a pong message blocking until the message has been sent.

public final void
setBatchingAllowed(boolean
New setting
batchingAllowed
)

Implements jakarta.websocket.RemoteEndpoint.setBatchingAllowed.

Enable or disable the batching of outgoing messages for this endpoint.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

baseback to summary
protected final WsRemoteEndpointImplBase base

Constructor Detail

WsRemoteEndpointBaseback to summary
pack-priv WsRemoteEndpointBase(WsRemoteEndpointImplBase base)

Method Detail

flushBatchback to summary
public final void flushBatch() throws IOException

Implements jakarta.websocket.RemoteEndpoint.flushBatch.

Doc from jakarta.websocket.RemoteEndpoint.flushBatch.

Flush any currently batched messages to the remote endpoint. This method will block until the flush completes.

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs while flushing
getBatchingAllowedback to summary
public final boolean getBatchingAllowed()

Implements jakarta.websocket.RemoteEndpoint.getBatchingAllowed.

Doc from jakarta.websocket.RemoteEndpoint.getBatchingAllowed.

Obtains the current batching status of the endpoint.

Returns:boolean

true if batching is enabled, otherwise false.

Annotations
@Override
sendPingback to summary
public final void sendPing(ByteBuffer applicationData) throws IOException, IllegalArgumentException

Implements jakarta.websocket.RemoteEndpoint.sendPing.

Doc from jakarta.websocket.RemoteEndpoint.sendPing.

Send a ping message blocking until the message has been sent. Note that if a message is in the process of being sent asynchronously, this method will block until that message and this ping has been sent.

Parameters
applicationData:ByteBuffer

The payload for the ping message

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs while sending the ping
IllegalArgumentException:
if the applicationData is too large for a control message (max 125 bytes)
sendPongback to summary
public final void sendPong(ByteBuffer applicationData) throws IOException, IllegalArgumentException

Implements jakarta.websocket.RemoteEndpoint.sendPong.

Doc from jakarta.websocket.RemoteEndpoint.sendPong.

Send a pong message blocking until the message has been sent. Note that if a message is in the process of being sent asynchronously, this method will block until that message and this pong has been sent.

Parameters
applicationData:ByteBuffer

The payload for the pong message

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs while sending the pong
IllegalArgumentException:
if the applicationData is too large for a control message (max 125 bytes)
setBatchingAllowedback to summary
public final void setBatchingAllowed(boolean batchingAllowed) throws IOException

Implements jakarta.websocket.RemoteEndpoint.setBatchingAllowed.

Doc from jakarta.websocket.RemoteEndpoint.setBatchingAllowed.

Enable or disable the batching of outgoing messages for this endpoint. If batching is disabled when it was previously enabled then this method will block until any currently batched messages have been written.

Parameters
batchingAllowed:boolean

New setting

Annotations
@Override
Exceptions
IOException:
If changing the value resulted in a call to flushBatch() and that call threw an IOException.