Class JettyWebSocketRemoteEndpoint
- java.lang.Object
-
- org.eclipse.jetty.websocket.common.JettyWebSocketRemoteEndpoint
-
- All Implemented Interfaces:
org.eclipse.jetty.websocket.api.RemoteEndpoint
public class JettyWebSocketRemoteEndpoint extends java.lang.Object implements org.eclipse.jetty.websocket.api.RemoteEndpoint
-
-
Constructor Summary
Constructors Constructor Description JettyWebSocketRemoteEndpoint(org.eclipse.jetty.websocket.core.CoreSession coreSession, org.eclipse.jetty.websocket.api.BatchMode batchMode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Initiate close of the Remote with no status code (no payload)voidclose(int statusCode, java.lang.String reason)Initiate close of the Remote with specified status code and optional reason phrasevoidflush()org.eclipse.jetty.websocket.api.BatchModegetBatchMode()intgetMaxOutgoingFrames()java.net.SocketAddressgetRemoteAddress()voidsendBytes(java.nio.ByteBuffer data)voidsendBytes(java.nio.ByteBuffer data, org.eclipse.jetty.websocket.api.WriteCallback callback)voidsendPartialBytes(java.nio.ByteBuffer fragment, boolean isLast)voidsendPartialBytes(java.nio.ByteBuffer fragment, boolean isLast, org.eclipse.jetty.websocket.api.WriteCallback callback)voidsendPartialString(java.lang.String fragment, boolean isLast)voidsendPartialString(java.lang.String fragment, boolean isLast, org.eclipse.jetty.websocket.api.WriteCallback callback)voidsendPing(java.nio.ByteBuffer applicationData)voidsendPing(java.nio.ByteBuffer applicationData, org.eclipse.jetty.websocket.api.WriteCallback callback)voidsendPong(java.nio.ByteBuffer applicationData)voidsendPong(java.nio.ByteBuffer applicationData, org.eclipse.jetty.websocket.api.WriteCallback callback)voidsendString(java.lang.String text)voidsendString(java.lang.String text, org.eclipse.jetty.websocket.api.WriteCallback callback)voidsetBatchMode(org.eclipse.jetty.websocket.api.BatchMode mode)voidsetMaxOutgoingFrames(int maxOutgoingFrames)
-
-
-
Method Detail
-
close
public void close()
Initiate close of the Remote with no status code (no payload)- Since:
- 10.0
-
close
public void close(int statusCode, java.lang.String reason)Initiate close of the Remote with specified status code and optional reason phrase- Parameters:
statusCode- the status code (must be valid and can be sent)reason- optional reason code- Since:
- 10.0
-
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
-
sendString
public void sendString(java.lang.String text, org.eclipse.jetty.websocket.api.WriteCallback callback)- Specified by:
sendStringin interfaceorg.eclipse.jetty.websocket.api.RemoteEndpoint
-
sendBytes
public void sendBytes(java.nio.ByteBuffer data) throws java.io.IOException- Specified by:
sendBytesin interfaceorg.eclipse.jetty.websocket.api.RemoteEndpoint- Throws:
java.io.IOException
-
sendBytes
public void sendBytes(java.nio.ByteBuffer data, org.eclipse.jetty.websocket.api.WriteCallback callback)- Specified by:
sendBytesin interfaceorg.eclipse.jetty.websocket.api.RemoteEndpoint
-
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
-
sendPartialBytes
public void sendPartialBytes(java.nio.ByteBuffer fragment, boolean isLast, org.eclipse.jetty.websocket.api.WriteCallback callback)- Specified by:
sendPartialBytesin interfaceorg.eclipse.jetty.websocket.api.RemoteEndpoint
-
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
-
sendPartialString
public void sendPartialString(java.lang.String fragment, boolean isLast, org.eclipse.jetty.websocket.api.WriteCallback callback)- Specified by:
sendPartialStringin interfaceorg.eclipse.jetty.websocket.api.RemoteEndpoint
-
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
-
sendPing
public void sendPing(java.nio.ByteBuffer applicationData, org.eclipse.jetty.websocket.api.WriteCallback callback)- Specified by:
sendPingin interfaceorg.eclipse.jetty.websocket.api.RemoteEndpoint
-
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
-
sendPong
public void sendPong(java.nio.ByteBuffer applicationData, org.eclipse.jetty.websocket.api.WriteCallback callback)- Specified by:
sendPongin 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 mode)
- Specified by:
setBatchModein interfaceorg.eclipse.jetty.websocket.api.RemoteEndpoint
-
getMaxOutgoingFrames
public int getMaxOutgoingFrames()
- Specified by:
getMaxOutgoingFramesin interfaceorg.eclipse.jetty.websocket.api.RemoteEndpoint
-
setMaxOutgoingFrames
public void setMaxOutgoingFrames(int maxOutgoingFrames)
- Specified by:
setMaxOutgoingFramesin interfaceorg.eclipse.jetty.websocket.api.RemoteEndpoint
-
getRemoteAddress
public java.net.SocketAddress getRemoteAddress()
- Specified by:
getRemoteAddressin 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
-
-