Class DomainBaseThrottleConfiguration
java.lang.Object
org.apache.synapse.commons.throttle.core.impl.domainbase.DomainBaseThrottleConfiguration
- All Implemented Interfaces:
ThrottleConfiguration
Holds all the controlling policy parameter for all domain names
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCallerConfiguration(CallerConfiguration configuration) To add a DomainBaseCallerConfigurationTo get a DomainBaseCallerConfiguration - if a configuration for given key found ,it returns , other wise , the default configuration will return.getConfigurationKeyOfCaller(String callerID) To get key for caller configuration if there is a configuration with callerID , it returns otherwise , on the first the ID contains one or more "." ,then recursively try to find the nearest root callerID.intgetType()To get the type of the throttlestatic void
-
Constructor Details
-
DomainBaseThrottleConfiguration
public DomainBaseThrottleConfiguration()
-
-
Method Details
-
getCallerConfiguration
To get a DomainBaseCallerConfiguration - if a configuration for given key found ,it returns , other wise , the default configuration will return.- Specified by:
getCallerConfigurationin interfaceThrottleConfiguration- Parameters:
ID- - The Remote caller id (domain name)- Returns:
- Returns the corresponding configuration for the caller with given ID
-
addCallerConfiguration
To add a DomainBaseCallerConfiguration- Specified by:
addCallerConfigurationin interfaceThrottleConfiguration- Parameters:
configuration- - The configuration of the caller
-
getConfigurationKeyOfCaller
To get key for caller configuration if there is a configuration with callerID , it returns otherwise , on the first the ID contains one or more "." ,then recursively try to find the nearest root callerID. else if the ID doesn't contains ".", try to find a key with *.{ID} . Note : For valid ID , it should contain only zero or more "*." as a prefix. example: (if ID is a.a.a), check pattern *.a.a and a.a then *.*.a or *.a or a ) if ID a then check start with *.a- Specified by:
getConfigurationKeyOfCallerin interfaceThrottleConfiguration- Parameters:
callerID- The id of the remote caller (callerID name)- Returns:
- String value -String representation of corrected epr-key for get configuration
-
getType
public int getType()Description copied from interface:ThrottleConfigurationTo get the type of the throttle- Specified by:
getTypein interfaceThrottleConfiguration- Returns:
- the type of the throttle
-
main
-