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:
org.eclipse.jetty.util.component.LifeCycle, org.eclipse.jetty.websocket.api.extensions.IncomingFrames, org.eclipse.jetty.websocket.common.events.EventDriver

public class JsrAnnotatedEventDriver extends AbstractJsrEventDriver
Base implementation for JSR-356 Annotated event drivers.
  • Constructor Details

    • JsrAnnotatedEventDriver

      public JsrAnnotatedEventDriver(org.eclipse.jetty.websocket.api.WebSocketPolicy policy, EndpointInstance endpointInstance, JsrEvents<?,?> events)
  • Method Details

    • init

      public void init(JsrSession jsrsession)
      Specified by:
      init in class AbstractJsrEventDriver
    • onBinaryFrame

      public void onBinaryFrame(ByteBuffer buffer, boolean fin) throws IOException
      Entry point for all incoming binary frames.
      Throws:
      IOException
    • onBinaryMessage

      public void onBinaryMessage(byte[] data)
      Entry point for binary frames destined for MessageHandler.Whole
    • onClose

      protected void onClose(javax.websocket.CloseReason closereason)
      Specified by:
      onClose in class AbstractJsrEventDriver
    • onConnect

      public void onConnect()
    • onError

      public void onError(Throwable cause)
    • onFrame

      public void onFrame(org.eclipse.jetty.websocket.api.extensions.Frame frame)
      Specified by:
      onFrame in interface org.eclipse.jetty.websocket.common.events.EventDriver
      Overrides:
      onFrame in class AbstractJsrEventDriver
    • onInputStream

      public void onInputStream(InputStream stream) throws IOException
      Throws:
      IOException
    • onPartialBinaryMessage

      public void onPartialBinaryMessage(ByteBuffer buffer, boolean fin)
    • onPartialTextMessage

      public void onPartialTextMessage(String message, boolean fin)
    • onPing

      public void onPing(ByteBuffer buffer)
      Specified by:
      onPing in interface org.eclipse.jetty.websocket.common.events.EventDriver
      Overrides:
      onPing in class org.eclipse.jetty.websocket.common.events.AbstractEventDriver
    • onPong

      public void onPong(ByteBuffer buffer)
      Specified by:
      onPong in interface org.eclipse.jetty.websocket.common.events.EventDriver
      Overrides:
      onPong in class org.eclipse.jetty.websocket.common.events.AbstractEventDriver
    • onReader

      public void onReader(Reader reader) throws IOException
      Throws:
      IOException
    • onTextFrame

      public void onTextFrame(ByteBuffer buffer, boolean fin) throws IOException
      Entry point for all incoming text frames.
      Throws:
      IOException
    • onTextMessage

      public void onTextMessage(String message)
      Entry point for whole text messages
    • setPathParameters

      public void setPathParameters(Map<String,String> pathParameters)
      Specified by:
      setPathParameters in class AbstractJsrEventDriver
    • toString

      public String toString()
      Overrides:
      toString in class org.eclipse.jetty.util.component.AbstractLifeCycle