Class JsrAnnotatedEventDriver
- java.lang.Object
-
- org.eclipse.jetty.util.component.AbstractLifeCycle
-
- org.eclipse.jetty.websocket.common.events.AbstractEventDriver
-
- org.eclipse.jetty.websocket.jsr356.endpoints.AbstractJsrEventDriver
-
- org.eclipse.jetty.websocket.jsr356.endpoints.JsrAnnotatedEventDriver
-
- All Implemented Interfaces:
LifeCycle
,IncomingFrames
,EventDriver
public class JsrAnnotatedEventDriver extends AbstractJsrEventDriver
Base implementation for JSR-356 Annotated event drivers.
-
-
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
-
-
Field Summary
-
Fields inherited from class org.eclipse.jetty.websocket.jsr356.endpoints.AbstractJsrEventDriver
config, jsrsession, metadata
-
Fields inherited from class org.eclipse.jetty.websocket.common.events.AbstractEventDriver
activeMessage, policy, session, targetLog, websocket
-
-
Constructor Summary
Constructors Constructor Description JsrAnnotatedEventDriver(WebSocketPolicy policy, EndpointInstance endpointInstance, JsrEvents<?,?> events)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
init(JsrSession jsrsession)
void
onBinaryFrame(java.nio.ByteBuffer buffer, boolean fin)
Entry point for all incoming binary frames.void
onBinaryMessage(byte[] data)
Entry point for binary frames destined forMessageHandler.Whole
protected void
onClose(javax.websocket.CloseReason closereason)
void
onConnect()
void
onError(java.lang.Throwable cause)
void
onFrame(Frame frame)
void
onInputStream(java.io.InputStream stream)
void
onPartialBinaryMessage(java.nio.ByteBuffer buffer, boolean fin)
void
onPartialTextMessage(java.lang.String message, boolean fin)
void
onPing(java.nio.ByteBuffer buffer)
void
onPong(java.nio.ByteBuffer buffer)
void
onReader(java.io.Reader reader)
void
onTextFrame(java.nio.ByteBuffer buffer, boolean fin)
Entry point for all incoming text frames.void
onTextMessage(java.lang.String message)
Entry point for whole text messagesvoid
setPathParameters(java.util.Map<java.lang.String,java.lang.String> pathParameters)
java.lang.String
toString()
-
Methods inherited from class org.eclipse.jetty.websocket.jsr356.endpoints.AbstractJsrEventDriver
getConfig, getJsrSession, getMetadata, onClose, openSession, setEndpointconfig
-
Methods inherited from class org.eclipse.jetty.websocket.common.events.AbstractEventDriver
appendMessage, dispatch, getBatchMode, getPolicy, getSession, incomingFrame, onContinuationFrame
-
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
-
-
-
-
Constructor Detail
-
JsrAnnotatedEventDriver
public JsrAnnotatedEventDriver(WebSocketPolicy policy, EndpointInstance endpointInstance, JsrEvents<?,?> events)
-
-
Method Detail
-
init
public void init(JsrSession jsrsession)
- Specified by:
init
in classAbstractJsrEventDriver
-
onBinaryFrame
public void onBinaryFrame(java.nio.ByteBuffer buffer, boolean fin) throws java.io.IOException
Entry point for all incoming binary frames.- Throws:
java.io.IOException
-
onBinaryMessage
public void onBinaryMessage(byte[] data)
Entry point for binary frames destined forMessageHandler.Whole
-
onClose
protected void onClose(javax.websocket.CloseReason closereason)
- Specified by:
onClose
in classAbstractJsrEventDriver
-
onConnect
public void onConnect()
-
onError
public void onError(java.lang.Throwable cause)
-
onFrame
public void onFrame(Frame frame)
- Specified by:
onFrame
in interfaceEventDriver
- Overrides:
onFrame
in classAbstractJsrEventDriver
-
onInputStream
public void onInputStream(java.io.InputStream stream) throws java.io.IOException
- Throws:
java.io.IOException
-
onPartialBinaryMessage
public void onPartialBinaryMessage(java.nio.ByteBuffer buffer, boolean fin)
-
onPartialTextMessage
public void onPartialTextMessage(java.lang.String message, boolean fin)
-
onPing
public void onPing(java.nio.ByteBuffer buffer)
- Specified by:
onPing
in interfaceEventDriver
- Overrides:
onPing
in classAbstractEventDriver
-
onPong
public void onPong(java.nio.ByteBuffer buffer)
- Specified by:
onPong
in interfaceEventDriver
- Overrides:
onPong
in classAbstractEventDriver
-
onReader
public void onReader(java.io.Reader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
onTextFrame
public void onTextFrame(java.nio.ByteBuffer buffer, boolean fin) throws java.io.IOException
Entry point for all incoming text frames.- Throws:
java.io.IOException
-
onTextMessage
public void onTextMessage(java.lang.String message)
Entry point for whole text messages
-
setPathParameters
public void setPathParameters(java.util.Map<java.lang.String,java.lang.String> pathParameters)
- Specified by:
setPathParameters
in classAbstractJsrEventDriver
-
toString
public java.lang.String toString()
- Overrides:
toString
in classAbstractLifeCycle
-
-