Package javax.websocket
Interface RemoteEndpoint.Basic
- 
- All Superinterfaces:
- RemoteEndpoint
 - Enclosing interface:
- RemoteEndpoint
 
 public static interface RemoteEndpoint.Basic extends RemoteEndpoint 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface javax.websocket.RemoteEndpointRemoteEndpoint.Async, RemoteEndpoint.Basic
 
- 
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description java.io.OutputStreamgetSendStream()java.io.WritergetSendWriter()voidsendBinary(java.nio.ByteBuffer data)Send the message, blocking until the message is sent.voidsendBinary(java.nio.ByteBuffer partialByte, boolean isLast)Sends part of a binary message to the remote endpoint.voidsendObject(java.lang.Object data)Encodes object as a message and sends it to the remote endpoint.voidsendText(java.lang.String text)Send the message, blocking until the message is sent.voidsendText(java.lang.String fragment, boolean isLast)Sends part of a text message to the remote endpoint.- 
Methods inherited from interface javax.websocket.RemoteEndpointflushBatch, getBatchingAllowed, sendPing, sendPong, setBatchingAllowed
 
- 
 
- 
- 
- 
Method Detail- 
sendTextvoid sendText(java.lang.String text) throws java.io.IOExceptionSend the message, blocking until the message is sent.- Parameters:
- text- The text message to send.
- Throws:
- java.lang.IllegalArgumentException- if- textis- null.
- java.io.IOException- if an I/O error occurs during the sending of the message.
 
 - 
sendBinaryvoid sendBinary(java.nio.ByteBuffer data) throws java.io.IOExceptionSend the message, blocking until the message is sent.- Parameters:
- data- The binary message to send
- Throws:
- java.lang.IllegalArgumentException- if- datais- null.
- java.io.IOException- if an I/O error occurs during the sending of the message.
 
 - 
sendTextvoid sendText(java.lang.String fragment, boolean isLast) throws java.io.IOExceptionSends 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:
- java.lang.IllegalArgumentException- if- fragmentis- null.
- java.io.IOException- if an I/O error occurs during the sending of the message.
 
 - 
sendBinaryvoid sendBinary(java.nio.ByteBuffer partialByte, boolean isLast) throws java.io.IOExceptionSends 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:
- java.lang.IllegalArgumentException- if- partialByteis- null.
- java.io.IOException- if an I/O error occurs during the sending of the message.
 
 - 
getSendStreamjava.io.OutputStream getSendStream() throws java.io.IOException- Throws:
- java.io.IOException
 
 - 
getSendWriterjava.io.Writer getSendWriter() throws java.io.IOException- Throws:
- java.io.IOException
 
 - 
sendObjectvoid sendObject(java.lang.Object data) throws java.io.IOException, EncodeExceptionEncodes 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.
- java.lang.IllegalArgumentException- if- datais- null.
- java.io.IOException- if an I/O error occurs during the sending of the message.
 
 
- 
 
-