public abstract class TyrusRemoteEndpoint extends 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(ByteBuffer applicationData)
Send a Ping message containing the given application data to the remote endpoint.
|
void |
sendPong(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.
|
String |
toString() |
public void sendPing(ByteBuffer applicationData) throws IOException
RemoteEndpointsendPing in interface RemoteEndpointapplicationData - the data to be carried in the ping request.IOException - if the ping failed to be sentpublic void sendPong(ByteBuffer applicationData) throws IOException
RemoteEndpointsendPong in interface RemoteEndpointapplicationData - the application data to be carried in the pong response.IOException - if the pong failed to be sentpublic void setBatchingAllowed(boolean allowed)
RemoteEndpointsetBatchingAllowed in interface RemoteEndpointallowed - whether the implementation is allowed to batch messages.public boolean getBatchingAllowed()
RemoteEndpointsetBatchingAllowed.getBatchingAllowed in interface RemoteEndpointpublic void flushBatch()
RemoteEndpointflushBatch in interface RemoteEndpointpublic void close(CloseReason cr)
Copyright © 2012-2017, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.