Interface RemoteEndpoint.Basic
-
Nested Class Summary
Nested classes/interfaces inherited from interface jakarta.websocket.RemoteEndpoint
RemoteEndpoint.Async, RemoteEndpoint.Basic
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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
Send the message, blocking until the message is sent.void
Sends part of a text message to the remote endpoint.Methods inherited from interface jakarta.websocket.RemoteEndpoint
flushBatch, getBatchingAllowed, sendPing, sendPong, setBatchingAllowed
-
Method Details
-
sendText
Send the message, blocking until the message is sent.- Parameters:
text
- The text message to send.- Throws:
IllegalArgumentException
- iftext
isnull
.IOException
- if an I/O error occurs during the sending of the message.
-
sendBinary
Send the message, blocking until the message is sent.- Parameters:
data
- The binary message to send- Throws:
IllegalArgumentException
- ifdata
isnull
.IOException
- if an I/O error occurs during the sending of the message.
-
sendText
Sends part of a text message to the remote endpoint. Once the first part of a message has been sent, no other text or binary messages may be sent until all remaining parts of this message have been sent.- Parameters:
fragment
- The partial message to sendisLast
-true
if this is the last part of the message, otherwisefalse
- Throws:
IllegalArgumentException
- iffragment
isnull
.IOException
- if an I/O error occurs during the sending of the message.
-
sendBinary
Sends part of a binary message to the remote endpoint. Once the first part of a message has been sent, no other text or binary messages may be sent until all remaining parts of this message have been sent.- Parameters:
partialByte
- The partial message to sendisLast
-true
if this is the last part of the message, otherwisefalse
- Throws:
IllegalArgumentException
- ifpartialByte
isnull
.IOException
- if an I/O error occurs during the sending of the message.
-
getSendStream
- Throws:
IOException
-
getSendWriter
- Throws:
IOException
-
sendObject
Encodes object as a message and sends it to the remote endpoint.- Parameters:
data
- The object to be sent.- Throws:
EncodeException
- if there was a problem encoding thedata
object as a websocket message.IllegalArgumentException
- ifdata
isnull
.IOException
- if an I/O error occurs during the sending of the message.
-