Class IPBaseCallerConfiguration
java.lang.Object
org.apache.synapse.commons.throttle.core.CallerConfiguration
org.apache.synapse.commons.throttle.core.impl.ipbase.IPBaseCallerConfiguration
Metadata for controls a caller(IP based) - static data -The data have built form processing
policy
-
Constructor Summary
ConstructorsConstructorDescriptionIPBaseCallerConfiguration(long unitTime, int maximumRequest, long prohibitTimePeriod, String ipRange) The Constructor with all configuration data -
Method Summary
Modifier and TypeMethodDescriptionTo get First Part of IP RangegetID()To get IP Range - Group IPTo get Second Part of IP RangeintgetType()To get the type of the throttlevoidsetFirstPartOfIPRange(String firstPartOfIPRange) To set First Part of IP RangevoidTo set IP RangevoidsetSecondPartOfIPRange(String secondPartOfIPRange) To set Second Part Of IP RangeMethods inherited from class org.apache.synapse.commons.throttle.core.CallerConfiguration
getAccessState, getMaximumRequestPerUnitTime, getProhibitTimePeriod, getUnitTime, setAccessState, setMaximumRequestPerUnitTime, setProhibitTimePeriod, setUnitTime
-
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 WindowmaximumRequest- - int value which represents Maximum RequestprohibitTimePeriod- - long value which represents Prohibit Time after Max request cameipRange- - String value which represents IP Range
-
-
Method Details
-
getID
To get IP Range - Group IP- Specified by:
getIDin classCallerConfiguration- Returns:
- String value of IP Range
-
getFirstPartOfIPRange
To get First Part of IP Range- Returns:
- String value of First Part Of Ip Range
-
getSecondPartOfIPRange
To get Second Part of IP Range- Returns:
- String value of Second Part Of IP Range
-
setID
To set IP Range- Specified by:
setIDin classCallerConfiguration- Parameters:
iprange- The string representation of ip (single or group)
-
getType
public int getType()Description copied from class:CallerConfigurationTo get the type of the throttle- Specified by:
getTypein classCallerConfiguration- Returns:
- the type of the throttle
-
setFirstPartOfIPRange
To set First Part of IP Range- Parameters:
firstPartOfIPRange- - String value
-
setSecondPartOfIPRange
To set Second Part Of IP Range- Parameters:
secondPartOfIPRange- - String value
-