Package org.apache.synapse.commons.throttle.core.impl.ipbase

# Class IPBaseCallerConfiguration

java.lang.Object
org.apache.synapse.commons.throttle.core.CallerConfiguration
org.apache.synapse.commons.throttle.core.impl.ipbase.IPBaseCallerConfiguration

public class IPBaseCallerConfiguration extends CallerConfiguration
Metadata for controls a caller(IP based) - static data -The data have built form processing policy

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IPBaseCallerConfiguration()`
  `IPBaseCallerConfiguration(long unitTime, int maximumRequest, long prohibitTimePeriod, String ipRange)`
  The Constructor with all configuration data

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getFirstPartOfIPRange()`
  To get First Part of IP Range
  `String`
  `getID()`
  To get IP Range - Group IP
  `String`
  `getSecondPartOfIPRange()`
  To get Second Part of IP Range
  `int`
  `getType()`
  To get the type of the throttle
  `void`
  `setFirstPartOfIPRange(String firstPartOfIPRange)`
  To set First Part of IP Range
  `void`
  `setID(String iprange)`
  To set IP Range
  `void`
  `setSecondPartOfIPRange(String secondPartOfIPRange)`
  To set Second Part Of IP Range

  ### Methods inherited from class org.apache.synapse.commons.throttle.core.CallerConfiguration

  `getAccessState, getMaximumRequestPerUnitTime, getProhibitTimePeriod, getUnitTime, setAccessState, setMaximumRequestPerUnitTime, setProhibitTimePeriod, setUnitTime`

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

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

- ## Constructor Details

  - ### IPBaseCallerConfiguration

    public IPBaseCallerConfiguration()

  - ### IPBaseCallerConfiguration

    public IPBaseCallerConfiguration(long unitTime, int maximumRequest, long prohibitTimePeriod, String ipRange)
    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
      `ipRange` - - String value which represents IP Range

- ## Method Details

  - ### getID

    public String getID()
    To get IP Range - Group IP
    Specified by:
      `getID` in class `CallerConfiguration`
    Returns:
      String value of IP Range

  - ### getFirstPartOfIPRange

    public String getFirstPartOfIPRange()
    To get First Part of IP Range
    Returns:
      String value of First Part Of Ip Range

  - ### getSecondPartOfIPRange

    public String getSecondPartOfIPRange()
    To get Second Part of IP Range
    Returns:
      String value of Second Part Of IP Range

  - ### setID

    public void setID(String iprange)
    To set IP Range
    Specified by:
      `setID` in class `CallerConfiguration`
    Parameters:
      `iprange` - The string representation of ip (single or group)

  - ### getType

    public int getType()
    Description copied from class: `CallerConfiguration`
    To get the type of the throttle
    Specified by:
      `getType` in class `CallerConfiguration`
    Returns:
      the type of the throttle

  - ### setFirstPartOfIPRange

    public void setFirstPartOfIPRange(String firstPartOfIPRange)
    To set First Part of IP Range
    Parameters:
      `firstPartOfIPRange` - - String value

  - ### setSecondPartOfIPRange

    public void setSecondPartOfIPRange(String secondPartOfIPRange)
    To set Second Part Of IP Range
    Parameters:
      `secondPartOfIPRange` - - String value