Class SessionTracker

    • Constructor Detail

      • SessionTracker

        public SessionTracker()
    • Method Detail

      • getSessions

        public java.util.Collection<Session> getSessions()
      • doStart

        protected void doStart()
                        throws java.lang.Exception
        Description copied from class: AbstractLifeCycle
        Method to override to start the lifecycle
        Overrides:
        doStart in class AbstractLifeCycle
        Throws:
        AbstractLifeCycle.StopException - If thrown, the lifecycle will immediately be stopped.
        java.lang.Exception - If there was a problem starting. Will cause a transition to FAILED state
      • doStop

        protected void doStop()
                       throws java.lang.Exception
        Description copied from class: AbstractLifeCycle
        Method to override to stop the lifecycle
        Overrides:
        doStop in class AbstractLifeCycle
        Throws:
        java.lang.Exception - If there was a problem stopping. Will cause a transition to FAILED state
      • shutdown

        public java.util.concurrent.CompletableFuture<java.lang.Void> shutdown()
        Description copied from interface: Graceful
        Shutdown the component. When this method returns, the component should not accept any new load.
        Specified by:
        shutdown in interface Graceful
        Returns:
        A future that is completed once all load on the component is completed
      • getNumSessions

        @ManagedAttribute("Total number of active WebSocket Sessions")
        public int getNumSessions()
      • dump

        public void dump​(java.lang.Appendable out,
                         java.lang.String indent)
                  throws java.io.IOException
        Description copied from interface: Dumpable
        Dump this object (and children) into an Appendable using the provided indent after any new lines. The indent should not be applied to the first object dumped.
        Specified by:
        dump in interface Dumpable
        Parameters:
        out - The appendable to dump to
        indent - The indent to apply after any new lines.
        Throws:
        java.io.IOException - if unable to write to Appendable