Class WebSocketRemoteEndpoint
- java.lang.Object
-
- org.eclipse.jetty.websocket.common.WebSocketRemoteEndpoint
-
- All Implemented Interfaces:
org.eclipse.jetty.websocket.api.RemoteEndpoint
public class WebSocketRemoteEndpoint extends Object implements org.eclipse.jetty.websocket.api.RemoteEndpoint
Endpoint 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()InetSocketAddressgetInetSocketAddress()Get the InetSocketAddress for the established connection.voidsendBytes(ByteBuffer data)Blocking write of bytes.voidsendBytes(ByteBuffer data, org.eclipse.jetty.websocket.api.WriteCallback callback)Future<Void>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, org.eclipse.jetty.websocket.api.WriteCallback callback)Future<Void>sendStringByFuture(String text)voidsetBatchMode(org.eclipse.jetty.websocket.api.BatchMode batchMode)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 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(ByteBuffer data) throws IOException
Blocking write of bytes.- Specified by:
sendBytesin interfaceorg.eclipse.jetty.websocket.api.RemoteEndpoint- Throws:
IOException
-
sendBytesByFuture
public Future<Void> sendBytesByFuture(ByteBuffer data)
- Specified by:
sendBytesByFuturein interfaceorg.eclipse.jetty.websocket.api.RemoteEndpoint
-
sendBytes
public void sendBytes(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(ByteBuffer fragment, boolean isLast) throws IOException
- Specified by:
sendPartialBytesin interfaceorg.eclipse.jetty.websocket.api.RemoteEndpoint- Throws:
IOException
-
sendPartialString
public void sendPartialString(String fragment, boolean isLast) throws IOException
- Specified by:
sendPartialStringin interfaceorg.eclipse.jetty.websocket.api.RemoteEndpoint- Throws:
IOException
-
sendPing
public void sendPing(ByteBuffer applicationData) throws IOException
- Specified by:
sendPingin interfaceorg.eclipse.jetty.websocket.api.RemoteEndpoint- Throws:
IOException
-
sendPong
public void sendPong(ByteBuffer applicationData) throws IOException
- Specified by:
sendPongin interfaceorg.eclipse.jetty.websocket.api.RemoteEndpoint- Throws:
IOException
-
sendString
public void sendString(String text) throws IOException
- Specified by:
sendStringin interfaceorg.eclipse.jetty.websocket.api.RemoteEndpoint- Throws:
IOException
-
sendStringByFuture
public Future<Void> sendStringByFuture(String text)
- Specified by:
sendStringByFuturein interfaceorg.eclipse.jetty.websocket.api.RemoteEndpoint
-
sendString
public void sendString(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 IOException- Specified by:
flushin interfaceorg.eclipse.jetty.websocket.api.RemoteEndpoint- Throws:
IOException
-
-