public abstract class TyrusRemoteEndpoint extends java.lang.Object implements RemoteEndpoint
RemoteEndpoint and represents the other side of the websocket connection.| Modifier and Type | Method and Description | 
|---|---|
| void | close(CloseReason cr) | 
| void | flushBatch()This method is only used when batching is allowed for this RemoteEndpint. | 
| boolean | getBatchingAllowed()Return whether the implementation is allowed to batch outgoing messages before sending. | 
| void | sendPing(java.nio.ByteBuffer applicationData)Send a Ping message containing the given application data to the remote endpoint. | 
| void | sendPong(java.nio.ByteBuffer applicationData)Allows the developer to send an unsolicited Pong message containing the given application data in order to serve
 as a unidirectional heartbeat for the session. | 
| void | setBatchingAllowed(boolean allowed)Indicate to the implementation that it is allowed to batch outgoing messages before sending. | 
| java.lang.String | toString() | 
public void sendPing(java.nio.ByteBuffer applicationData)
              throws java.io.IOException
RemoteEndpointIt is not safe for other threads to use the ByteBuffer until the sending of this message is complete. If the sending of the message completes successfully, the buffer's limit will be unchanged and the buffer's position will be equal to the limit. If the sending of the message does not complete successfully, the state of the buffer is undefined.
sendPing in interface RemoteEndpointapplicationData - the data to be carried in the ping request.java.io.IOException - if the ping failed to be sentpublic void sendPong(java.nio.ByteBuffer applicationData)
              throws java.io.IOException
RemoteEndpointIt is not safe for other threads to use the ByteBuffer until the sending of this message is complete. If the sending of the message completes successfully, the buffer's limit will be unchanged and the buffer's position will be equal to the limit. If the sending of the message does not complete successfully, the state of the buffer is undefined.
sendPong in interface RemoteEndpointapplicationData - the application data to be carried in the pong response.java.io.IOException - if the pong failed to be sentpublic java.lang.String toString()
toString in class java.lang.Objectpublic void setBatchingAllowed(boolean allowed)
RemoteEndpointsetBatchingAllowed in interface RemoteEndpointallowed - whether the implementation is allowed to batch messages.public boolean getBatchingAllowed()
RemoteEndpointsetBatchingAllowed.getBatchingAllowed in interface RemoteEndpointtrue if the implementation is allowed to batch outgoing messages before sending, otherwise
         falsepublic void flushBatch()
RemoteEndpointflushBatch in interface RemoteEndpointpublic void close(CloseReason cr)
Copyright © 2012–2020 Oracle Corporation. All rights reserved.