public abstract class SPIRemoteEndpoint extends Object
RemoteEndpoint interface which should be implemented
by container implementations.| Constructor and Description |
|---|
SPIRemoteEndpoint() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
close(javax.websocket.CloseReason closeReason)
Send a Close message.
|
abstract Future<?> |
sendBinary(ByteBuffer data)
Send a binary message, returning when all of the message has been transmitted.
|
abstract Future<?> |
sendBinary(ByteBuffer partialByte,
boolean isLast)
Send a binary message in pieces, blocking until all of the message has been transmitted.
|
abstract Future<?> |
sendPing(ByteBuffer applicationData)
Send a Ping message containing the given application data to the remote endpoint.
|
abstract Future<?> |
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.
|
abstract Future<?> |
sendText(String text)
Send a text message, blocking until all of the message has been transmitted.
|
abstract Future<?> |
sendText(String fragment,
boolean isLast)
Send a text message in pieces, blocking until all of the message has been transmitted.
|
abstract void |
setWriteTimeout(long timeoutMs)
Sets the timeout for the writing operation.
|
public abstract Future<?> sendText(String text) throws IOException
text - the message to be sent.IOExceptionpublic abstract Future<?> sendBinary(ByteBuffer data) throws IOException
data - the message to be sent.IOExceptionpublic abstract Future<?> sendText(String fragment, boolean isLast) throws IOException
fragment - the piece of the message being sent.isLast - Whether the fragment being sent is the last piece of the message.IOExceptionpublic abstract Future<?> sendBinary(ByteBuffer partialByte, boolean isLast) throws IOException
partialByte - the piece of the message being sent.isLast - Whether the fragment being sent is the last piece of the message.IOExceptionpublic abstract Future<?> sendPing(ByteBuffer applicationData) throws IOException
applicationData - the data to be carried in the ping request.IOExceptionpublic abstract Future<?> sendPong(ByteBuffer applicationData) throws IOException
applicationData - the application data to be carried in the pong response.IOExceptionpublic abstract void close(javax.websocket.CloseReason closeReason)
closeReason - close reason.public abstract void setWriteTimeout(long timeoutMs)
timeoutMs - timeout in milliseconds.Copyright © 2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.