Class WebSocketRemoteEndpoint
- java.lang.Object
-
- org.eclipse.jetty.websocket.common.WebSocketRemoteEndpoint
-
- All Implemented Interfaces:
RemoteEndpoint
public class WebSocketRemoteEndpoint extends java.lang.Object implements RemoteEndpoint
Endpoint for Writing messages to the Remote websocket.
-
-
Constructor Summary
Constructors Constructor Description WebSocketRemoteEndpoint(LogicalConnection connection, OutgoingFrames outgoing)WebSocketRemoteEndpoint(LogicalConnection connection, OutgoingFrames outgoing, BatchMode batchMode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidflush()BatchModegetBatchMode()java.net.InetSocketAddressgetInetSocketAddress()Get the InetSocketAddress for the established connection.intgetMaxOutgoingFrames()voidsendBytes(java.nio.ByteBuffer data)Blocking write of bytes.voidsendBytes(java.nio.ByteBuffer data, WriteCallback callback)java.util.concurrent.Future<java.lang.Void>sendBytesByFuture(java.nio.ByteBuffer data)voidsendPartialBytes(java.nio.ByteBuffer fragment, boolean isLast)voidsendPartialString(java.lang.String fragment, boolean isLast)voidsendPing(java.nio.ByteBuffer applicationData)voidsendPong(java.nio.ByteBuffer applicationData)voidsendString(java.lang.String text)voidsendString(java.lang.String text, WriteCallback callback)java.util.concurrent.Future<java.lang.Void>sendStringByFuture(java.lang.String text)voidsetBatchMode(BatchMode batchMode)voidsetMaxOutgoingFrames(int maxOutgoingFrames)java.lang.StringtoString()voiduncheckedSendFrame(WebSocketFrame frame, WriteCallback callback)
-
-
-
Constructor Detail
-
WebSocketRemoteEndpoint
public WebSocketRemoteEndpoint(LogicalConnection connection, OutgoingFrames outgoing)
-
WebSocketRemoteEndpoint
public WebSocketRemoteEndpoint(LogicalConnection connection, OutgoingFrames outgoing, BatchMode batchMode)
-
-
Method Detail
-
getInetSocketAddress
public java.net.InetSocketAddress 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
public void sendBytes(java.nio.ByteBuffer data) throws java.io.IOExceptionBlocking write of bytes.- Specified by:
sendBytesin interfaceRemoteEndpoint- Throws:
java.io.IOException
-
sendBytesByFuture
public java.util.concurrent.Future<java.lang.Void> sendBytesByFuture(java.nio.ByteBuffer data)
- Specified by:
sendBytesByFuturein interfaceRemoteEndpoint
-
sendBytes
public void sendBytes(java.nio.ByteBuffer data, WriteCallback callback)- Specified by:
sendBytesin interfaceRemoteEndpoint
-
uncheckedSendFrame
public void uncheckedSendFrame(WebSocketFrame frame, WriteCallback callback)
-
sendPartialBytes
public void sendPartialBytes(java.nio.ByteBuffer fragment, boolean isLast) throws java.io.IOException- Specified by:
sendPartialBytesin interfaceRemoteEndpoint- Throws:
java.io.IOException
-
sendPartialString
public void sendPartialString(java.lang.String fragment, boolean isLast) throws java.io.IOException- Specified by:
sendPartialStringin interfaceRemoteEndpoint- Throws:
java.io.IOException
-
sendPing
public void sendPing(java.nio.ByteBuffer applicationData) throws java.io.IOException- Specified by:
sendPingin interfaceRemoteEndpoint- Throws:
java.io.IOException
-
sendPong
public void sendPong(java.nio.ByteBuffer applicationData) throws java.io.IOException- Specified by:
sendPongin interfaceRemoteEndpoint- Throws:
java.io.IOException
-
sendString
public void sendString(java.lang.String text) throws java.io.IOException- Specified by:
sendStringin interfaceRemoteEndpoint- Throws:
java.io.IOException
-
sendStringByFuture
public java.util.concurrent.Future<java.lang.Void> sendStringByFuture(java.lang.String text)
- Specified by:
sendStringByFuturein interfaceRemoteEndpoint
-
sendString
public void sendString(java.lang.String text, WriteCallback callback)- Specified by:
sendStringin interfaceRemoteEndpoint
-
getBatchMode
public BatchMode getBatchMode()
- Specified by:
getBatchModein interfaceRemoteEndpoint
-
setBatchMode
public void setBatchMode(BatchMode batchMode)
- Specified by:
setBatchModein interfaceRemoteEndpoint
-
getMaxOutgoingFrames
public int getMaxOutgoingFrames()
- Specified by:
getMaxOutgoingFramesin interfaceRemoteEndpoint
-
setMaxOutgoingFrames
public void setMaxOutgoingFrames(int maxOutgoingFrames)
- Specified by:
setMaxOutgoingFramesin interfaceRemoteEndpoint
-
flush
public void flush() throws java.io.IOException- Specified by:
flushin interfaceRemoteEndpoint- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-