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.AbstractLifeCycleListenerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
org.eclipse.jetty.util.component.LifeCycle.Listener -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected MessageAppenderprivate final org.eclipse.jetty.util.log.Loggerprotected WebSocketPolicyprotected WebSocketSessionprotected final org.eclipse.jetty.util.log.Loggerprotected final ObjectFields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendMessage(ByteBuffer buffer, boolean fin) protected voidvoidincomingFrame(Frame frame) Process the incoming frame.voidonContinuationFrame(ByteBuffer buffer, boolean fin) voidonPing(ByteBuffer buffer) voidonPong(ByteBuffer buffer) voidopenSession(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, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface 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:
getPolicyin interfaceEventDriver
-
getSession
- Specified by:
getSessionin interfaceEventDriver
-
incomingFrame
Description copied from interface:IncomingFramesProcess 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:
incomingFramein interfaceIncomingFrames- Parameters:
frame- the frame to process
-
onContinuationFrame
- Specified by:
onContinuationFramein interfaceEventDriver- Throws:
IOException
-
onPong
- Specified by:
onPongin interfaceEventDriver
-
onPing
- Specified by:
onPingin interfaceEventDriver
-
getBatchMode
- Specified by:
getBatchModein interfaceEventDriver
-
openSession
- Specified by:
openSessionin interfaceEventDriver
-