Class AbstractEventDriver
- java.lang.Object
-
- org.eclipse.jetty.util.component.AbstractLifeCycle
-
- org.eclipse.jetty.websocket.common.events.AbstractEventDriver
-
- All Implemented Interfaces:
LifeCycle,IncomingFrames,EventDriver
- Direct Known Subclasses:
JettyAnnotatedEventDriver,JettyListenerEventDriver
public abstract class AbstractEventDriver extends 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
AbstractLifeCycle.AbstractLifeCycleListener
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
-
Constructor Summary
Constructors Constructor Description AbstractEventDriver(WebSocketPolicy policy, java.lang.Object websocket)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BatchModegetBatchMode()WebSocketPolicygetPolicy()WebSocketSessiongetSession()voidincomingFrame(Frame frame)Process the incoming frame.voidonContinuationFrame(java.nio.ByteBuffer buffer, boolean fin)voidonPing(java.nio.ByteBuffer buffer)voidonPong(java.nio.ByteBuffer buffer)voidopenSession(WebSocketSession session)-
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stop, toString
-
Methods inherited from class java.lang.Object
equals, 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
-
-
-
-
Constructor Detail
-
AbstractEventDriver
public AbstractEventDriver(WebSocketPolicy policy, java.lang.Object websocket)
-
-
Method Detail
-
getPolicy
public WebSocketPolicy getPolicy()
- Specified by:
getPolicyin interfaceEventDriver
-
getSession
public WebSocketSession getSession()
- Specified by:
getSessionin interfaceEventDriver
-
incomingFrame
public void incomingFrame(Frame frame)
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
public void onContinuationFrame(java.nio.ByteBuffer buffer, boolean fin) throws java.io.IOException- Specified by:
onContinuationFramein interfaceEventDriver- Throws:
java.io.IOException
-
onPong
public void onPong(java.nio.ByteBuffer buffer)
- Specified by:
onPongin interfaceEventDriver
-
onPing
public void onPing(java.nio.ByteBuffer buffer)
- Specified by:
onPingin interfaceEventDriver
-
getBatchMode
public BatchMode getBatchMode()
- Specified by:
getBatchModein interfaceEventDriver
-
openSession
public void openSession(WebSocketSession session)
- Specified by:
openSessionin interfaceEventDriver
-
-