Class AbstractEventDriver
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.websocket.common.events.AbstractEventDriver
- All Implemented Interfaces:
org.eclipse.jetty.util.component.LifeCycle
,IncomingFrames
,EventDriver
- Direct Known Subclasses:
AbstractJsrEventDriver
,JettyAnnotatedEventDriver
,JettyListenerEventDriver
public abstract class AbstractEventDriver
extends org.eclipse.jetty.util.component.AbstractLifeCycle
implements IncomingFrames, EventDriver
EventDriver is the main interface between the User's WebSocket POJO and the internal jetty implementation of WebSocket.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
org.eclipse.jetty.util.component.LifeCycle.Listener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected MessageAppender
private final org.eclipse.jetty.util.log.Logger
protected WebSocketPolicy
protected WebSocketSession
protected final org.eclipse.jetty.util.log.Logger
protected final Object
Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
appendMessage
(ByteBuffer buffer, boolean fin) protected void
void
incomingFrame
(Frame frame) Process the incoming frame.void
onContinuationFrame
(ByteBuffer buffer, boolean fin) void
onPing
(ByteBuffer buffer) void
onPong
(ByteBuffer buffer) void
openSession
(WebSocketSession session) Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, doStart, doStop, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stop, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.websocket.common.events.EventDriver
onBinaryFrame, onBinaryMessage, onClose, onConnect, onError, onFrame, onInputStream, onReader, onTextFrame, onTextMessage
-
Field Details
-
logger
private final org.eclipse.jetty.util.log.Logger logger -
targetLog
protected final org.eclipse.jetty.util.log.Logger targetLog -
policy
-
websocket
-
session
-
activeMessage
-
-
Constructor Details
-
AbstractEventDriver
-
-
Method Details
-
appendMessage
- Throws:
IOException
-
dispatch
-
getPolicy
- Specified by:
getPolicy
in interfaceEventDriver
-
getSession
- Specified by:
getSession
in interfaceEventDriver
-
incomingFrame
Description copied from interface:IncomingFrames
Process the incoming frame.Note: if you need to hang onto any information from the frame, be sure to copy it, as the information contained in the Frame will be released and/or reused by the implementation.
- Specified by:
incomingFrame
in interfaceIncomingFrames
- Parameters:
frame
- the frame to process
-
onContinuationFrame
- Specified by:
onContinuationFrame
in interfaceEventDriver
- Throws:
IOException
-
onPong
- Specified by:
onPong
in interfaceEventDriver
-
onPing
- Specified by:
onPing
in interfaceEventDriver
-
getBatchMode
- Specified by:
getBatchMode
in interfaceEventDriver
-
openSession
- Specified by:
openSession
in interfaceEventDriver
-