Package org.apache.tomcat.websocket
Class WsRemoteEndpointBase
- java.lang.Object
- 
- org.apache.tomcat.websocket.WsRemoteEndpointBase
 
- 
- All Implemented Interfaces:
- RemoteEndpoint
 - Direct Known Subclasses:
- WsRemoteEndpointAsync,- WsRemoteEndpointBasic
 
 public abstract class WsRemoteEndpointBase extends java.lang.Object implements RemoteEndpoint 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface javax.websocket.RemoteEndpointRemoteEndpoint.Async, RemoteEndpoint.Basic
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected WsRemoteEndpointImplBasebase
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidflushBatch()Flush any currently batched messages to the remote endpoint.booleangetBatchingAllowed()Obtains the current batching status of the endpoint.voidsendPing(java.nio.ByteBuffer applicationData)Send a ping message blocking until the message has been sent.voidsendPong(java.nio.ByteBuffer applicationData)Send a pong message blocking until the message has been sent.voidsetBatchingAllowed(boolean batchingAllowed)Enable or disable the batching of outgoing messages for this endpoint.
 
- 
- 
- 
Field Detail- 
baseprotected final WsRemoteEndpointImplBase base 
 
- 
 - 
Method Detail- 
setBatchingAllowedpublic final void setBatchingAllowed(boolean batchingAllowed) throws java.io.IOExceptionDescription copied from interface:javax.websocket.RemoteEndpointEnable 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.- Specified by:
- setBatchingAllowedin interface- RemoteEndpoint
- Parameters:
- batchingAllowed- New setting
- Throws:
- java.io.IOException- If changing the value resulted in a call to- RemoteEndpoint.flushBatch()and that call threw an- IOException.
 
 - 
getBatchingAllowedpublic final boolean getBatchingAllowed() Description copied from interface:javax.websocket.RemoteEndpointObtains the current batching status of the endpoint.- Specified by:
- getBatchingAllowedin interface- RemoteEndpoint
- Returns:
- trueif batching is enabled, otherwise- false.
 
 - 
flushBatchpublic final void flushBatch() throws java.io.IOExceptionDescription copied from interface:javax.websocket.RemoteEndpointFlush any currently batched messages to the remote endpoint. This method will block until the flush completes.- Specified by:
- flushBatchin interface- RemoteEndpoint
- Throws:
- java.io.IOException- If an I/O error occurs while flushing
 
 - 
sendPingpublic final void sendPing(java.nio.ByteBuffer applicationData) throws java.io.IOException, java.lang.IllegalArgumentExceptionDescription copied from interface:javax.websocket.RemoteEndpointSend 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.- Specified by:
- sendPingin interface- RemoteEndpoint
- Parameters:
- applicationData- The payload for the ping message
- Throws:
- java.io.IOException- If an I/O error occurs while sending the ping
- java.lang.IllegalArgumentException- if the applicationData is too large for a control message (max 125 bytes)
 
 - 
sendPongpublic final void sendPong(java.nio.ByteBuffer applicationData) throws java.io.IOException, java.lang.IllegalArgumentExceptionDescription copied from interface:javax.websocket.RemoteEndpointSend 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.- Specified by:
- sendPongin interface- RemoteEndpoint
- Parameters:
- applicationData- The payload for the pong message
- Throws:
- java.io.IOException- If an I/O error occurs while sending the pong
- java.lang.IllegalArgumentException- if the applicationData is too large for a control message (max 125 bytes)
 
 
- 
 
-