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
RemoteEndpoint
sendPing
in interface RemoteEndpoint
applicationData
- the data to be carried in the ping request.IOException
- if the ping failed to be sentpublic void sendPong(ByteBuffer applicationData) throws IOException
RemoteEndpoint
sendPong
in interface RemoteEndpoint
applicationData
- the application data to be carried in the pong response.IOException
- if the pong failed to be sentpublic void setBatchingAllowed(boolean allowed)
RemoteEndpoint
setBatchingAllowed
in interface RemoteEndpoint
allowed
- whether the implementation is allowed to batch messages.public boolean getBatchingAllowed()
RemoteEndpoint
setBatchingAllowed
.getBatchingAllowed
in interface RemoteEndpoint
public void flushBatch()
RemoteEndpoint
flushBatch
in interface RemoteEndpoint
public void close(CloseReason cr)
Copyright © 2012-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.