Class JavaxWebSocketRemoteEndpoint
java.lang.Object
org.eclipse.jetty.ee8.websocket.javax.common.JavaxWebSocketRemoteEndpoint
- All Implemented Interfaces:
javax.websocket.RemoteEndpoint, OutgoingFrames
- Direct Known Subclasses:
JavaxWebSocketAsyncRemote, JavaxWebSocketBasicRemote
public class JavaxWebSocketRemoteEndpoint
extends Object
implements javax.websocket.RemoteEndpoint, OutgoingFrames
-
Nested Class Summary
Nested classes/interfaces inherited from interface javax.websocket.RemoteEndpoint
javax.websocket.RemoteEndpoint.Async, javax.websocket.RemoteEndpoint.Basic -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected byteprotected final JavaxWebSocketSession -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJavaxWebSocketRemoteEndpoint(JavaxWebSocketSession session, CoreSession coreSession) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidassertMessageNotNull(Object data) protected voidassertSendHandlerNotNull(javax.websocket.SendHandler handler) voidbooleanlonglongprotected MessageOutputStreamprotected MessageWritervoidA frame, and optional callback, intended for the network layer.voidsendObject(Object data, Callback callback) voidsendPing(ByteBuffer data) voidsendPong(ByteBuffer data) voidsetBatchingAllowed(boolean allowed) voidsetIdleTimeout(long ms) voidsetWriteTimeout(long ms)
-
Field Details
-
session
-
batch
protected boolean batch -
messageType
protected byte messageType
-
-
Constructor Details
-
JavaxWebSocketRemoteEndpoint
-
-
Method Details
-
newMessageWriter
-
newMessageOutputStream
-
flushBatch
- Specified by:
flushBatchin interfacejavax.websocket.RemoteEndpoint- Throws:
IOException
-
getBatchingAllowed
public boolean getBatchingAllowed()- Specified by:
getBatchingAllowedin interfacejavax.websocket.RemoteEndpoint
-
setBatchingAllowed
- Specified by:
setBatchingAllowedin interfacejavax.websocket.RemoteEndpoint- Throws:
IOException
-
getIdleTimeout
public long getIdleTimeout() -
setIdleTimeout
public void setIdleTimeout(long ms) -
getWriteTimeout
public long getWriteTimeout() -
setWriteTimeout
public void setWriteTimeout(long ms) -
sendFrame
Description copied from interface:OutgoingFramesA frame, and optional callback, intended for the network layer.Note: the frame can undergo many transformations in the various layers and extensions present in the implementation.
If you are implementing a mutation, you are obliged to handle the incoming Callback appropriately.
- Specified by:
sendFramein interfaceOutgoingFrames- Parameters:
frame- the frame to eventually write to the network layer.callback- the callback to notify when the frame is written.batch- the batch mode requested by the sender.
-
sendObject
public void sendObject(Object data, Callback callback) throws IOException, javax.websocket.EncodeException - Throws:
IOExceptionjavax.websocket.EncodeException
-
sendPing
- Specified by:
sendPingin interfacejavax.websocket.RemoteEndpoint- Throws:
IOExceptionIllegalArgumentException
-
sendPong
- Specified by:
sendPongin interfacejavax.websocket.RemoteEndpoint- Throws:
IOExceptionIllegalArgumentException
-
assertMessageNotNull
-
assertSendHandlerNotNull
protected void assertSendHandlerNotNull(javax.websocket.SendHandler handler)
-