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 boolean
protected byte
protected long
protected final JavaxWebSocketSession
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
JavaxWebSocketRemoteEndpoint
(JavaxWebSocketSession session, CoreSession coreSession) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
assertMessageNotNull
(Object data) protected void
assertSendHandlerNotNull
(javax.websocket.SendHandler handler) void
boolean
long
protected MessageOutputStream
protected MessageWriter
void
A frame, callback, intended for the network layer.void
sendFrame
(OutgoingEntry entry) void
sendObject
(Object data, Callback callback) void
sendPing
(ByteBuffer data) void
sendPong
(ByteBuffer data) void
setBatchingAllowed
(boolean allowed) void
setIdleTimeout
(long ms)
-
Field Details
-
session
-
batch
protected boolean batch -
messageType
protected byte messageType -
messageWriteTimeout
protected long messageWriteTimeout
-
-
Constructor Details
-
JavaxWebSocketRemoteEndpoint
-
-
Method Details
-
newMessageWriter
-
newMessageOutputStream
-
flushBatch
- Specified by:
flushBatch
in interfacejavax.websocket.RemoteEndpoint
- Throws:
IOException
-
getBatchingAllowed
public boolean getBatchingAllowed()- Specified by:
getBatchingAllowed
in interfacejavax.websocket.RemoteEndpoint
-
setBatchingAllowed
- Specified by:
setBatchingAllowed
in interfacejavax.websocket.RemoteEndpoint
- Throws:
IOException
-
getIdleTimeout
public long getIdleTimeout() -
setIdleTimeout
public void setIdleTimeout(long ms) -
sendFrame
Description copied from interface:OutgoingFrames
A frame, 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:
sendFrame
in 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.
-
sendFrame
Description copied from interface:OutgoingFrames
- Specified by:
sendFrame
in interfaceOutgoingFrames
- Parameters:
entry
- the frame to eventually write to the network layer.
-
sendObject
public void sendObject(Object data, Callback callback) throws IOException, javax.websocket.EncodeException - Throws:
IOException
javax.websocket.EncodeException
-
sendPing
- Specified by:
sendPing
in interfacejavax.websocket.RemoteEndpoint
- Throws:
IOException
IllegalArgumentException
-
sendPong
- Specified by:
sendPong
in interfacejavax.websocket.RemoteEndpoint
- Throws:
IOException
IllegalArgumentException
-
assertMessageNotNull
-
assertSendHandlerNotNull
protected void assertSendHandlerNotNull(javax.websocket.SendHandler handler)
-