public abstract class WsRemoteEndpointBase extends java.lang.Object implements RemoteEndpoint
RemoteEndpoint.Async, RemoteEndpoint.Basic
Modifier and Type | Field and Description |
---|---|
protected WsRemoteEndpointImplBase |
base |
Modifier and Type | Method and Description |
---|---|
void |
flushBatch()
Flush any currently batched messages to the remote endpoint.
|
boolean |
getBatchingAllowed()
Obtains the current batching status of the endpoint.
|
void |
sendPing(java.nio.ByteBuffer applicationData)
Send a ping message blocking until the message has been sent.
|
void |
sendPong(java.nio.ByteBuffer applicationData)
Send a pong message blocking until the message has been sent.
|
void |
setBatchingAllowed(boolean batchingAllowed)
Enable or disable the batching of outgoing messages for this endpoint.
|
protected final WsRemoteEndpointImplBase base
public final void setBatchingAllowed(boolean batchingAllowed) throws java.io.IOException
javax.websocket.RemoteEndpoint
setBatchingAllowed
in interface RemoteEndpoint
batchingAllowed
- New settingjava.io.IOException
- If changing the value resulted in a call to
RemoteEndpoint.flushBatch()
and that call threw an
IOException
.public final boolean getBatchingAllowed()
javax.websocket.RemoteEndpoint
getBatchingAllowed
in interface RemoteEndpoint
true
if batching is enabled, otherwise
false
.public final void flushBatch() throws java.io.IOException
javax.websocket.RemoteEndpoint
flushBatch
in interface RemoteEndpoint
java.io.IOException
- If an I/O error occurs while flushingpublic final void sendPing(java.nio.ByteBuffer applicationData) throws java.io.IOException, java.lang.IllegalArgumentException
javax.websocket.RemoteEndpoint
sendPing
in interface RemoteEndpoint
applicationData
- The payload for the ping messagejava.io.IOException
- If an I/O error occurs while sending the pingjava.lang.IllegalArgumentException
- if the applicationData is too large for
a control message (max 125 bytes)public final void sendPong(java.nio.ByteBuffer applicationData) throws java.io.IOException, java.lang.IllegalArgumentException
javax.websocket.RemoteEndpoint
sendPong
in interface RemoteEndpoint
applicationData
- The payload for the pong messagejava.io.IOException
- If an I/O error occurs while sending the pongjava.lang.IllegalArgumentException
- if the applicationData is too large for
a control message (max 125 bytes)Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.