org.apache.synapse.commons.throttle.core.impl.domainbase

## 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 and Description
    `DomainBaseThrottleConfiguration()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCallerConfiguration(CallerConfiguration configuration)` To add a DomainBaseCallerConfiguration
    `CallerConfiguration` | `getCallerConfiguration(String ID)` To get a DomainBaseCallerConfiguration - if a configuration for given key found ,it returns , other wise , the default configuration will return.
    `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.
    `int` | `getType()` To get the type of the throttle
    `static void` | `main(String[] args)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DomainBaseThrottleConfiguration

          public DomainBaseThrottleConfiguration()

  - ### 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:
        `getCallerConfiguration` in interface `ThrottleConfiguration`
      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:
        `addCallerConfiguration` in interface `ThrottleConfiguration`
      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:
        `getConfigurationKeyOfCaller` in interface `ThrottleConfiguration`
      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: `ThrottleConfiguration`
      To get the type of the throttle
      Specified by:
        `getType` in interface `ThrottleConfiguration`
      Returns:
        the type of the throttle

    - #### main

          public static void main(String[] args)

Copyright © 2005–2017 Apache Software Foundation. All rights reserved.