public class WsRemoteEndpointBasic extends WsRemoteEndpointBase implements RemoteEndpoint.Basic
RemoteEndpoint.Async, RemoteEndpoint.Basic
base
Modifier and Type | Method and Description |
---|---|
OutputStream |
getSendStream() |
Writer |
getSendWriter() |
void |
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 |
sendText(String text)
Send the message, blocking until the message is sent.
|
void |
sendText(String fragment,
boolean isLast)
Sends part of a text message to the remote endpoint.
|
flushBatch, getBatchingAllowed, sendPing, sendPong, setBatchingAllowed
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
flushBatch, getBatchingAllowed, sendPing, sendPong, setBatchingAllowed
public void sendText(String text) throws IOException
javax.websocket.RemoteEndpoint.Basic
sendText
in interface RemoteEndpoint.Basic
text
- The text message to send.IOException
- if an I/O error occurs during the sending of the
message.public void sendBinary(ByteBuffer data) throws IOException
javax.websocket.RemoteEndpoint.Basic
sendBinary
in interface RemoteEndpoint.Basic
data
- The binary message to sendIOException
- if an I/O error occurs during the sending of the
message.public void sendText(String fragment, boolean isLast) throws IOException
javax.websocket.RemoteEndpoint.Basic
sendText
in interface RemoteEndpoint.Basic
fragment
- The partial message to sendisLast
- true
if this is the last part of the
message, otherwise false
IOException
- if an I/O error occurs during the sending of the
message.public void sendBinary(ByteBuffer partialByte, boolean isLast) throws IOException
javax.websocket.RemoteEndpoint.Basic
sendBinary
in interface RemoteEndpoint.Basic
partialByte
- The partial message to sendisLast
- true
if this is the last part of the
message, otherwise false
IOException
- if an I/O error occurs during the sending of the
message.public OutputStream getSendStream() throws IOException
getSendStream
in interface RemoteEndpoint.Basic
IOException
public Writer getSendWriter() throws IOException
getSendWriter
in interface RemoteEndpoint.Basic
IOException
public void sendObject(Object o) throws IOException, EncodeException
javax.websocket.RemoteEndpoint.Basic
sendObject
in interface RemoteEndpoint.Basic
o
- The object to be sent.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.Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.