Top Fields Constructors Methods
org.apache.tomcat.websocket

public Class WsRemoteEndpointBasic

extends WsRemoteEndpointBase
implements Basic
Class Inheritance
All Implemented Interfaces
jakarta.websocket.RemoteEndpoint.Basic, jakarta.websocket.RemoteEndpoint
Imports
java.io.IOException, .OutputStream, .Writer, java.nio.ByteBuffer, jakarta.websocket.EncodeException, .RemoteEndpoint

Field Summary

Inherited from org.apache.tomcat.websocket.WsRemoteEndpointBase:
base

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public OutputStream
public Writer
public void
sendBinary(ByteBuffer
The binary message to send
data
)

Implements jakarta.websocket.RemoteEndpoint.Basic.sendBinary.

Send the message, blocking until the message is sent.

public void
sendBinary(ByteBuffer
The partial message to send
partialByte
,
boolean
true if this is the last part of the message, otherwise false
isLast
)

Implements jakarta.websocket.RemoteEndpoint.Basic.sendBinary.

Sends part of a binary message to the remote endpoint.

public void
sendObject(Object
The object to be sent.
o
)

Implements jakarta.websocket.RemoteEndpoint.Basic.sendObject.

Encodes object as a message and sends it to the remote endpoint.

public void
sendText(String
The text message to send.
text
)

Implements jakarta.websocket.RemoteEndpoint.Basic.sendText.

Send the message, blocking until the message is sent.

public void
sendText(String
The partial message to send
fragment
,
boolean
true if this is the last part of the message, otherwise false
isLast
)

Implements jakarta.websocket.RemoteEndpoint.Basic.sendText.

Sends part of a text message to the remote endpoint.

Inherited from org.apache.tomcat.websocket.WsRemoteEndpointBase:
flushBatchgetBatchingAllowedsendPingsendPongsetBatchingAllowed

Constructor Detail

WsRemoteEndpointBasicback to summary
pack-priv WsRemoteEndpointBasic(WsRemoteEndpointImplBase base)

Method Detail

getSendStreamback to summary
public OutputStream getSendStream() throws IOException

Implements jakarta.websocket.RemoteEndpoint.Basic.getSendStream.

Annotations
@Override
getSendWriterback to summary
public Writer getSendWriter() throws IOException

Implements jakarta.websocket.RemoteEndpoint.Basic.getSendWriter.

Annotations
@Override
sendBinaryback to summary
public void sendBinary(ByteBuffer data) throws IOException

Implements jakarta.websocket.RemoteEndpoint.Basic.sendBinary.

Doc from jakarta.websocket.RemoteEndpoint.Basic.sendBinary.

Send the message, blocking until the message is sent.

Parameters
data:ByteBuffer

The binary message to send

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs during the sending of the message.
sendBinaryback to summary
public void sendBinary(ByteBuffer partialByte, boolean isLast) throws IOException

Implements jakarta.websocket.RemoteEndpoint.Basic.sendBinary.

Doc from jakarta.websocket.RemoteEndpoint.Basic.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:ByteBuffer

The partial message to send

isLast:boolean

true if this is the last part of the message, otherwise false

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs during the sending of the message.
sendObjectback to summary
public void sendObject(Object o) throws IOException, EncodeException

Implements jakarta.websocket.RemoteEndpoint.Basic.sendObject.

Doc from jakarta.websocket.RemoteEndpoint.Basic.sendObject.

Encodes object as a message and sends it to the remote endpoint.

Parameters
o:Object

The object to be sent.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs during the sending of the message.
EncodeException:
if there was a problem encoding the data object as a websocket message.
sendTextback to summary
public void sendText(String text) throws IOException

Implements jakarta.websocket.RemoteEndpoint.Basic.sendText.

Doc from jakarta.websocket.RemoteEndpoint.Basic.sendText.

Send the message, blocking until the message is sent.

Parameters
text:String

The text message to send.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs during the sending of the message.
sendTextback to summary
public void sendText(String fragment, boolean isLast) throws IOException

Implements jakarta.websocket.RemoteEndpoint.Basic.sendText.

Doc from jakarta.websocket.RemoteEndpoint.Basic.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:String

The partial message to send

isLast:boolean

true if this is the last part of the message, otherwise false

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs during the sending of the message.