public static interface RemoteEndpoint.Basic extends RemoteEndpoint
RemoteEndpoint.Async, RemoteEndpoint.Basic
Modifier and Type | Method and Description |
---|---|
OutputStream |
getSendStream() |
Writer |
getSendWriter() |
void |
sendBinary(ByteBuffer data)
Send the message, blocking until the message is sent.
|
void |
sendBinary(ByteBuffer partialByte,
boolean isLast)
Sends part of a binary message to the remote endpoint.
|
void |
sendObject(Object data)
Encodes object as a message and sends it to the remote endpoint.
|
void |
sendText(String text)
Send the message, blocking until the message is sent.
|
void |
sendText(String fragment,
boolean isLast)
Sends part of a text message to the remote endpoint.
|
flushBatch, getBatchingAllowed, sendPing, sendPong, setBatchingAllowed
void sendText(String text) throws IOException
text
- The text message to send.IllegalArgumentException
- if text
is null
.IOException
- if an I/O error occurs during the sending of the
message.void sendBinary(ByteBuffer data) throws IOException
data
- The binary message to sendIllegalArgumentException
- if data
is null
.IOException
- if an I/O error occurs during the sending of the
message.void sendText(String fragment, boolean isLast) throws IOException
fragment
- The partial message to sendisLast
- true
if this is the last part of the
message, otherwise false
IllegalArgumentException
- if fragment
is null
.IOException
- if an I/O error occurs during the sending of the
message.void sendBinary(ByteBuffer partialByte, boolean isLast) throws IOException
partialByte
- The partial message to sendisLast
- true
if this is the last part of the
message, otherwise false
IllegalArgumentException
- if partialByte
is
null
.IOException
- if an I/O error occurs during the sending of the
message.OutputStream getSendStream() throws IOException
IOException
Writer getSendWriter() throws IOException
IOException
void sendObject(Object data) throws IOException, EncodeException
data
- The object to be sent.EncodeException
- if there was a problem encoding the
data
object as a websocket message.IllegalArgumentException
- if data
is null
.IOException
- if an I/O error occurs during the sending of the
message.Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.