Package org.apache.tomcat.websocket
Class WsRemoteEndpointBasic
java.lang.Object
org.apache.tomcat.websocket.WsRemoteEndpointBase
org.apache.tomcat.websocket.WsRemoteEndpointBasic
- All Implemented Interfaces:
RemoteEndpoint
,RemoteEndpoint.Basic
-
Nested Class Summary
Nested classes/interfaces inherited from interface jakarta.websocket.RemoteEndpoint
RemoteEndpoint.Async, RemoteEndpoint.Basic
-
Field Summary
Fields inherited from class org.apache.tomcat.websocket.WsRemoteEndpointBase
base
-
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 o) 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 class org.apache.tomcat.websocket.WsRemoteEndpointBase
flushBatch, getBatchingAllowed, sendPing, sendPong, setBatchingAllowed
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface jakarta.websocket.RemoteEndpoint
flushBatch, getBatchingAllowed, sendPing, sendPong, setBatchingAllowed
-
Method Details
-
sendText
Description copied from interface:jakarta.websocket.RemoteEndpoint.Basic
Send the message, blocking until the message is sent.- Specified by:
sendText
in interfaceRemoteEndpoint.Basic
- Parameters:
text
- The text message to send.- Throws:
IOException
- if an I/O error occurs during the sending of the message.
-
sendBinary
Description copied from interface:jakarta.websocket.RemoteEndpoint.Basic
Send the message, blocking until the message is sent.- Specified by:
sendBinary
in interfaceRemoteEndpoint.Basic
- Parameters:
data
- The binary message to send- Throws:
IOException
- if an I/O error occurs during the sending of the message.
-
sendText
Description copied from interface:jakarta.websocket.RemoteEndpoint.Basic
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.- Specified by:
sendText
in interfaceRemoteEndpoint.Basic
- Parameters:
fragment
- The partial message to sendisLast
-true
if this is the last part of the message, otherwisefalse
- Throws:
IOException
- if an I/O error occurs during the sending of the message.
-
sendBinary
Description copied from interface:jakarta.websocket.RemoteEndpoint.Basic
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.- Specified by:
sendBinary
in interfaceRemoteEndpoint.Basic
- Parameters:
partialByte
- The partial message to sendisLast
-true
if this is the last part of the message, otherwisefalse
- Throws:
IOException
- if an I/O error occurs during the sending of the message.
-
getSendStream
- Specified by:
getSendStream
in interfaceRemoteEndpoint.Basic
- Throws:
IOException
-
getSendWriter
- Specified by:
getSendWriter
in interfaceRemoteEndpoint.Basic
- Throws:
IOException
-
sendObject
Description copied from interface:jakarta.websocket.RemoteEndpoint.Basic
Encodes object as a message and sends it to the remote endpoint.- Specified by:
sendObject
in interfaceRemoteEndpoint.Basic
- Parameters:
o
- The object to be sent.- Throws:
IOException
- if an I/O error occurs during the sending of the message.EncodeException
- if there was a problem encoding thedata
object as a websocket message.
-