Class AbstractEventDriver

  • All Implemented Interfaces:
    org.eclipse.jetty.util.component.LifeCycle, org.eclipse.jetty.websocket.api.extensions.IncomingFrames, EventDriver
    Direct Known Subclasses:
    JettyAnnotatedEventDriver, JettyListenerEventDriver

    public abstract class AbstractEventDriver
    extends org.eclipse.jetty.util.component.AbstractLifeCycle
    implements org.eclipse.jetty.websocket.api.extensions.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

      Fields 
      Modifier and Type Field Description
      protected MessageAppender activeMessage  
      protected org.eclipse.jetty.websocket.api.WebSocketPolicy policy  
      protected WebSocketSession session  
      protected org.eclipse.jetty.util.log.Logger TARGET_LOG  
      protected java.lang.Object websocket  
      • Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

        FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractEventDriver​(org.eclipse.jetty.websocket.api.WebSocketPolicy policy, java.lang.Object websocket)  
    • Field Detail

      • TARGET_LOG

        protected final org.eclipse.jetty.util.log.Logger TARGET_LOG
      • policy

        protected org.eclipse.jetty.websocket.api.WebSocketPolicy policy
      • websocket

        protected final java.lang.Object websocket
    • Constructor Detail

      • AbstractEventDriver

        public AbstractEventDriver​(org.eclipse.jetty.websocket.api.WebSocketPolicy policy,
                                   java.lang.Object websocket)
    • Method Detail

      • appendMessage

        protected void appendMessage​(java.nio.ByteBuffer buffer,
                                     boolean fin)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • dispatch

        protected void dispatch​(java.lang.Runnable runnable)
      • getPolicy

        public org.eclipse.jetty.websocket.api.WebSocketPolicy getPolicy()
        Specified by:
        getPolicy in interface EventDriver
      • incomingFrame

        public void incomingFrame​(org.eclipse.jetty.websocket.api.extensions.Frame frame)
        Specified by:
        incomingFrame in interface org.eclipse.jetty.websocket.api.extensions.IncomingFrames
      • onContinuationFrame

        public void onContinuationFrame​(java.nio.ByteBuffer buffer,
                                        boolean fin)
                                 throws java.io.IOException
        Specified by:
        onContinuationFrame in interface EventDriver
        Throws:
        java.io.IOException
      • onPong

        public void onPong​(java.nio.ByteBuffer buffer)
        Specified by:
        onPong in interface EventDriver
      • onPing

        public void onPing​(java.nio.ByteBuffer buffer)
        Specified by:
        onPing in interface EventDriver
      • getBatchMode

        public org.eclipse.jetty.websocket.api.BatchMode getBatchMode()
        Specified by:
        getBatchMode in interface EventDriver