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
RemoteEndpointsendPing 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
RemoteEndpointsendPong 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–2025 Oracle Corporation. All rights reserved.