Class ThrottleHandler

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.apache.axis2.engine.Handler

        org.apache.axis2.engine.Handler.InvocationResponse
    • Constructor Summary

      Constructors 
      Constructor Description
      ThrottleHandler()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract int getThrottleType()  
      org.apache.axis2.engine.Handler.InvocationResponse invoke​(org.apache.axis2.context.MessageContext msgContext)  
      Throttle loadThrottle​(org.apache.axis2.context.MessageContext messageContext, int throttleType)
      Loads a throttle metadata for a particular throttle type
      void process​(Throttle throttle, org.apache.axis2.context.MessageContext messageContext)
      processing through the throttle 1) concurrent throttling 2) access rate based throttling - domain or ip
      • Methods inherited from class org.apache.axis2.handlers.AbstractHandler

        cleanup, flowComplete, getHandlerDesc, getName, getParameter, init, toString
    • Constructor Detail

      • ThrottleHandler

        public ThrottleHandler()
    • Method Detail

      • getThrottleType

        protected abstract int getThrottleType()
        Returns:
        int - indicates the type of the throttle according to the scope
      • loadThrottle

        public Throttle loadThrottle​(org.apache.axis2.context.MessageContext messageContext,
                                     int throttleType)
                              throws ThrottleException
        Loads a throttle metadata for a particular throttle type
        Parameters:
        messageContext - - The messageContext
        throttleType - - The type of throttle
        Returns:
        IPBaseThrottleConfiguration - The IPBaseThrottleConfiguration - load from AxisConfiguration
        Throws:
        ThrottleException - Throws if the throttle type is unsupported
      • process

        public void process​(Throttle throttle,
                            org.apache.axis2.context.MessageContext messageContext)
                     throws ThrottleException,
                            org.apache.axis2.AxisFault
        processing through the throttle 1) concurrent throttling 2) access rate based throttling - domain or ip
        Parameters:
        throttle - The Throttle object - holds all configuration and state data of the throttle
        messageContext - The MessageContext , that holds all data per message basis
        Throws:
        org.apache.axis2.AxisFault - Throws when access must deny for caller
        ThrottleException - ThrottleException
      • invoke

        public org.apache.axis2.engine.Handler.InvocationResponse invoke​(org.apache.axis2.context.MessageContext msgContext)
                                                                  throws org.apache.axis2.AxisFault
        Throws:
        org.apache.axis2.AxisFault