Class ConnectionLimit

    • 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 inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void check()  
      protected void doStart()  
      protected void doStop()  
      int getConnections()  
      long getIdleTimeout()  
      int getMaxConnections()  
      protected void limit()  
      void onAccepted​(java.nio.channels.SelectableChannel channel)  
      void onAcceptFailed​(java.nio.channels.SelectableChannel channel, java.lang.Throwable cause)  
      void onAccepting​(java.nio.channels.SelectableChannel channel)  
      void onClosed​(Connection connection)  
      void onOpened​(Connection connection)  
      void setIdleTimeout​(long idleTimeout)  
      void setMaxConnections​(int max)  
      protected void unlimit()  
      • 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

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ConnectionLimit

        public ConnectionLimit​(@Name("maxConnections")
                               int maxConnections,
                               @Name("server")
                               Server server)
      • ConnectionLimit

        public ConnectionLimit​(@Name("maxConnections")
                               int maxConnections,
                               @Name("connectors")
                               Connector... connectors)
    • Method Detail

      • getIdleTimeout

        @ManagedAttribute("The endpoint idle timeout in ms to apply when the connection limit is reached")
        public long getIdleTimeout()
        Returns:
        If >= 0, the endpoint idle timeout in ms to apply when the connection limit is reached
      • setIdleTimeout

        public void setIdleTimeout​(long idleTimeout)
        Parameters:
        idleTimeout - If >= 0 the endpoint idle timeout in ms to apply when the connection limit is reached
      • getMaxConnections

        @ManagedAttribute("The maximum number of connections allowed")
        public int getMaxConnections()
      • setMaxConnections

        public void setMaxConnections​(int max)
      • getConnections

        @ManagedAttribute("The current number of connections ")
        public int getConnections()
      • doStart

        protected void doStart()
                        throws java.lang.Exception
        Overrides:
        doStart in class org.eclipse.jetty.util.component.AbstractLifeCycle
        Throws:
        java.lang.Exception
      • doStop

        protected void doStop()
                       throws java.lang.Exception
        Overrides:
        doStop in class org.eclipse.jetty.util.component.AbstractLifeCycle
        Throws:
        java.lang.Exception
      • check

        protected void check()
      • limit

        protected void limit()
      • unlimit

        protected void unlimit()