Class WebSocketRemoteEndpoint
java.lang.Object
org.eclipse.jetty.websocket.common.WebSocketRemoteEndpoint
- All Implemented Interfaces:
RemoteEndpoint
Endpoint for Writing messages to the Remote websocket.
-
Constructor Summary
ConstructorsConstructorDescriptionWebSocketRemoteEndpoint(LogicalConnection connection, OutgoingFrames outgoing) WebSocketRemoteEndpoint(LogicalConnection connection, OutgoingFrames outgoing, BatchMode batchMode) -
Method Summary
Modifier and TypeMethodDescriptionvoidflush()Get the InetSocketAddress for the established connection.intvoidsendBytes(ByteBuffer data) Blocking write of bytes.voidsendBytes(ByteBuffer data, WriteCallback callback) sendBytesByFuture(ByteBuffer data) voidsendPartialBytes(ByteBuffer fragment, boolean isLast) voidsendPartialString(String fragment, boolean isLast) voidsendPing(ByteBuffer applicationData) voidsendPong(ByteBuffer applicationData) voidsendString(String text) voidsendString(String text, WriteCallback callback) sendStringByFuture(String text) voidsetBatchMode(BatchMode batchMode) voidsetMaxOutgoingFrames(int maxOutgoingFrames) toString()voiduncheckedSendFrame(WebSocketFrame frame, WriteCallback callback)
-
Constructor Details
-
WebSocketRemoteEndpoint
-
WebSocketRemoteEndpoint
public WebSocketRemoteEndpoint(LogicalConnection connection, OutgoingFrames outgoing, BatchMode batchMode)
-
-
Method Details
-
getInetSocketAddress
Get the InetSocketAddress for the established connection.- Specified by:
getInetSocketAddressin interfaceRemoteEndpoint- Returns:
- the InetSocketAddress for the established connection. (or null, if the connection is no longer established)
-
sendBytes
Blocking write of bytes.- Specified by:
sendBytesin interfaceRemoteEndpoint- Throws:
IOException
-
sendBytesByFuture
- Specified by:
sendBytesByFuturein interfaceRemoteEndpoint
-
sendBytes
- Specified by:
sendBytesin interfaceRemoteEndpoint
-
uncheckedSendFrame
-
sendPartialBytes
- Specified by:
sendPartialBytesin interfaceRemoteEndpoint- Throws:
IOException
-
sendPartialString
- Specified by:
sendPartialStringin interfaceRemoteEndpoint- Throws:
IOException
-
sendPing
- Specified by:
sendPingin interfaceRemoteEndpoint- Throws:
IOException
-
sendPong
- Specified by:
sendPongin interfaceRemoteEndpoint- Throws:
IOException
-
sendString
- Specified by:
sendStringin interfaceRemoteEndpoint- Throws:
IOException
-
sendStringByFuture
- Specified by:
sendStringByFuturein interfaceRemoteEndpoint
-
sendString
- Specified by:
sendStringin interfaceRemoteEndpoint
-
getBatchMode
- Specified by:
getBatchModein interfaceRemoteEndpoint
-
setBatchMode
- Specified by:
setBatchModein interfaceRemoteEndpoint
-
getMaxOutgoingFrames
public int getMaxOutgoingFrames()- Specified by:
getMaxOutgoingFramesin interfaceRemoteEndpoint
-
setMaxOutgoingFrames
public void setMaxOutgoingFrames(int maxOutgoingFrames) - Specified by:
setMaxOutgoingFramesin interfaceRemoteEndpoint
-
flush
- Specified by:
flushin interfaceRemoteEndpoint- Throws:
IOException
-
toString
-