Package org.apache.synapse.commons.throttle.core

# Class AccessRateController

java.lang.Object
org.apache.synapse.commons.throttle.core.AccessRateController

public class AccessRateController extends Object
Controls the access of remote callers according to the controlling policy . This provides abstraction that need to control access based on caller IP or caller domain name. This implementation is thread safe.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AccessRateController()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `AccessInformation`
  `canAccess(ThrottleContext throttleContext, String callerID, int callerType)`
  To check whether caller can access not not base on the controlling policy

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

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

- ## Constructor Details

  - ### AccessRateController

    public AccessRateController()

- ## Method Details

  - ### canAccess

    public AccessInformation canAccess(ThrottleContext throttleContext, String callerID, int callerType) throws ThrottleException
    To check whether caller can access not not base on the controlling policy
    Parameters:
      `throttleContext` - - current states of throttle - RunTime Data
      `callerID` - - Identifier for remote caller - ex: ip or domainname
      `callerType` - - the type of the caller
    Returns:
      access information
    Throws:
      `ThrottleException`