Class DomainBaseThrottleConfiguration
- java.lang.Object
-
- org.apache.synapse.commons.throttle.core.impl.domainbase.DomainBaseThrottleConfiguration
-
- All Implemented Interfaces:
ThrottleConfiguration
public class DomainBaseThrottleConfiguration extends Object implements ThrottleConfiguration
Holds all the controlling policy parameter for all domain names
-
-
Constructor Summary
Constructors Constructor Description DomainBaseThrottleConfiguration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCallerConfiguration(CallerConfiguration configuration)To add a DomainBaseCallerConfigurationCallerConfigurationgetCallerConfiguration(String ID)To get a DomainBaseCallerConfiguration - if a configuration for given key found ,it returns , other wise , the default configuration will return.StringgetConfigurationKeyOfCaller(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 voidmain(String[] args)
-
-
-
Method Detail
-
getCallerConfiguration
public CallerConfiguration getCallerConfiguration(String ID)
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
public void addCallerConfiguration(CallerConfiguration configuration)
To add a DomainBaseCallerConfiguration- Specified by:
addCallerConfigurationin interfaceThrottleConfiguration- Parameters:
configuration- - The configuration of the caller
-
getConfigurationKeyOfCaller
public String 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. 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
public static void main(String[] args)
-
-