public interface RemoteEndpoint<T>
| Modifier and Type | Method and Description |
|---|---|
OutputStream |
getSendStream() |
Writer |
getSendWriter() |
void |
sendBytes(byte[] data)
Send a binary message, returning when all of the message has been transmitted.
|
Future<SendResult> |
sendBytes(byte[] data,
SendHandler completion)
Initiates the asynchronous transmission of a binary message.
|
void |
sendObject(T o)
Sends a custom developer object, blocking until it has been transmitted.
|
Future<SendResult> |
sendObject(T o,
SendHandler handler)
Initiates the transmission of a custom developer object.
|
void |
sendPartialBytes(byte[] partialByte,
boolean isLast)
Send a binary message, blocking until all of the message has been transmitted.
|
void |
sendPartialString(String fragment,
boolean isLast) |
void |
sendPing(byte[] applicationData)
Send a Ping message containing the given application data to the remote endpoint.
|
void |
sendPong(byte[] 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 |
sendString(String text)
Send a text message, blocking until all of the message has been transmitted.
|
Future<SendResult> |
sendString(String text,
SendHandler completion)
Initiates the asynchronous transmission of a text message.
|
void sendString(String text) throws IOException
IOExceptionvoid sendBytes(byte[] data)
throws IOException
IOExceptionvoid sendPartialString(String fragment, boolean isLast) throws IOException
IOExceptionvoid sendPartialBytes(byte[] partialByte,
boolean isLast)
throws IOException
IOExceptionOutputStream getSendStream() throws IOException
IOExceptionWriter getSendWriter() throws IOException
IOExceptionvoid sendObject(T o) throws IOException, EncodeException
text - completion - IOExceptionEncodeExceptionFuture<SendResult> sendString(String text, SendHandler completion)
text - completion - Future<SendResult> sendBytes(byte[] data, SendHandler completion)
text - completion - Future<SendResult> sendObject(T o, SendHandler handler)
text - completion - void sendPing(byte[] applicationData)
applicationData - void sendPong(byte[] applicationData)
Copyright © 2012 Oracle and/or its affiliates. All rights reserved.