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 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 Description int
getAccessState()
To get access stateabstract String
getID()
To get IDint
getMaximumRequestPerUnitTime()
To get Maximum Requestlong
getProhibitTimePeriod()
To get prohibit time periodabstract int
getType()
To get the type of the throttlelong
getUnitTime()
To get UnitTimevoid
setAccessState(int accessState)
To set access stateabstract void
setID(String ID)
To set IDvoid
setMaximumRequestPerUnitTime(int maximumRequest)
To set Maximum Requestvoid
setProhibitTimePeriod(long prohibitTimePeriod)
To set Prohibit Time Periodvoid
setUnitTime(long unitTime)
To set Unit Time
-
-
-
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 WindowmaximumRequest
- - int value which represents Maximum RequestprohibitTimePeriod
- - long value which represents Prohibit Time after Max request cameID
- - 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
-
-