Package jakarta.websocket
Interface RemoteEndpoint.Basic
- All Superinterfaces:
- RemoteEndpoint
- Enclosing interface:
- RemoteEndpoint
- 
Nested Class SummaryNested classes/interfaces inherited from interface jakarta.websocket.RemoteEndpointRemoteEndpoint.Async, RemoteEndpoint.Basic
- 
Method SummaryModifier and TypeMethodDescriptionvoidsendBinary(ByteBuffer data) Send the message, blocking until the message is sent.voidsendBinary(ByteBuffer partialByte, boolean isLast) Sends part of a binary message to the remote endpoint.voidsendObject(Object data) Encodes object as a message and sends it to the remote endpoint.voidSend the message, blocking until the message is sent.voidSends part of a text message to the remote endpoint.Methods inherited from interface jakarta.websocket.RemoteEndpointflushBatch, getBatchingAllowed, sendPing, sendPong, setBatchingAllowed
- 
Method Details- 
sendTextSend the message, blocking until the message is sent.- Parameters:
- text- The text message to send.
- Throws:
- IllegalArgumentException- if- textis- null.
- IOException- if an I/O error occurs during the sending of the message.
 
- 
sendBinarySend the message, blocking until the message is sent.- Parameters:
- data- The binary message to send
- Throws:
- IllegalArgumentException- if- datais- null.
- IOException- if an I/O error occurs during the sending of the message.
 
- 
sendTextSends 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 send
- isLast-- trueif this is the last part of the message, otherwise- false
- Throws:
- IllegalArgumentException- if- fragmentis- null.
- IOException- if an I/O error occurs during the sending of the message.
 
- 
sendBinarySends 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 send
- isLast-- trueif this is the last part of the message, otherwise- false
- Throws:
- IllegalArgumentException- if- partialByteis- null.
- IOException- if an I/O error occurs during the sending of the message.
 
- 
getSendStream- Throws:
- IOException
 
- 
getSendWriter- Throws:
- IOException
 
- 
sendObjectEncodes 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 the- dataobject as a websocket message.
- IllegalArgumentException- if- datais- null.
- IOException- if an I/O error occurs during the sending of the message.
 
 
-