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