org.apache.synapse.commons.throttle.core

## Class CallerConfiguration

- java.lang.Object
- - org.apache.synapse.commons.throttle.core.CallerConfiguration

- Direct Known Subclasses:
    DomainBaseCallerConfiguration, IPBaseCallerConfiguration, RoleBaseCallerConfiguration

      public abstract class CallerConfiguration
      extends Object

  All the configuration data for a caller – this data have been defined according to the policy

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `CallerConfiguration()`
    `protected` | `CallerConfiguration(long unitTime, int maximumRequest, long prohibitTimePeriod, String ID)` The Constructor with all configuration data

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getAccessState()` To get access state
    `abstract String` | `getID()` To get ID
    `int` | `getMaximumRequestPerUnitTime()` To get Maximum Request
    `long` | `getProhibitTimePeriod()` To get prohibit time period
    `abstract int` | `getType()` To get the type of the throttle
    `long` | `getUnitTime()` To get UnitTime
    `void` | `setAccessState(int accessState)` To set access state
    `abstract void` | `setID(String ID)` To set ID
    `void` | `setMaximumRequestPerUnitTime(int maximumRequest)` To set Maximum Request
    `void` | `setProhibitTimePeriod(long prohibitTimePeriod)` To set Prohibit Time Period
    `void` | `setUnitTime(long unitTime)` To set Unit Time

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CallerConfiguration

          protected CallerConfiguration()

    - #### CallerConfiguration

          protected CallerConfiguration(long unitTime,
                                        int maximumRequest,
                                        long prohibitTimePeriod,
                                        String ID)

      The Constructor with all configuration data
      Parameters:
        `unitTime` - - long value which represents Unit Time Window
        `maximumRequest` - - int value which represents Maximum Request
        `prohibitTimePeriod` - - long value which represents Prohibit Time after Max request came
        `ID` - - String value which represents ID

  - ### Method Detail

    - #### getAccessState

          public int getAccessState()

      To get access state
      Returns:
        int value indicate access state

    - #### getMaximumRequestPerUnitTime

          public int getMaximumRequestPerUnitTime()

      To get Maximum Request
      Returns:
        int value of Maximum Request Count

    - #### getUnitTime

          public long getUnitTime()

      To get UnitTime
      Returns:
        long value of Unit Time

    - #### getProhibitTimePeriod

          public long getProhibitTimePeriod()

      To get prohibit time period
      Returns:
        long value of prohibit time period

    - #### setMaximumRequestPerUnitTime

          public void setMaximumRequestPerUnitTime(int maximumRequest)

      To set Maximum Request
      Parameters:
        `maximumRequest` - -int value

    - #### setUnitTime

          public void setUnitTime(long unitTime)

      To set Unit Time
      Parameters:
        `unitTime` - - long value

    - #### setProhibitTimePeriod

          public void setProhibitTimePeriod(long prohibitTimePeriod)

      To set Prohibit Time Period
      Parameters:
        `prohibitTimePeriod` - -long value

    - #### setAccessState

          public void setAccessState(int accessState)

      To set access state
      Parameters:
        `accessState` - caller access state , allow,deny and control

    - #### getID

          public abstract String getID()

      To get ID
      Returns:
        String value of ID

    - #### setID

          public abstract void setID(String ID)

      To set ID
      Parameters:
        `ID` - The id of caller

    - #### getType

          public abstract int getType()

      To get the type of the throttle
      Returns:
        the type of the throttle

Copyright © 2005–2023 Apache Software Foundation. All rights reserved.