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