Class CallerConfiguration
java.lang.Object
org.apache.synapse.commons.throttle.core.CallerConfiguration
- Direct Known Subclasses:
DomainBaseCallerConfiguration,IPBaseCallerConfiguration,RoleBaseCallerConfiguration
All the configuration data for a caller – this data have been defined according to the policy
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedCallerConfiguration(long unitTime, int maximumRequest, long prohibitTimePeriod, String ID) The Constructor with all configuration data -
Method Summary
Modifier and TypeMethodDescriptionintTo get access stateabstract StringgetID()To get IDintTo get Maximum RequestlongTo get prohibit time periodabstract intgetType()To get the type of the throttlelongTo get UnitTimevoidsetAccessState(int accessState) To set access stateabstract voidTo set IDvoidsetMaximumRequestPerUnitTime(int maximumRequest) To set Maximum RequestvoidsetProhibitTimePeriod(long prohibitTimePeriod) To set Prohibit Time PeriodvoidsetUnitTime(long unitTime) To set Unit Time
-
Constructor Details
-
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 WindowmaximumRequest- - int value which represents Maximum RequestprohibitTimePeriod- - long value which represents Prohibit Time after Max request cameID- - String value which represents ID
-
-
Method Details
-
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
To get ID- Returns:
- String value of ID
-
setID
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
-