org.apache.synapse.commons.throttle.core

## Class RoleBasedAccessRateController

- java.lang.Object
- - org.apache.synapse.commons.throttle.core.RoleBasedAccessRateController

-     public class RoleBasedAccessRateController
      extends java.lang.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 and Description
    `RoleBasedAccessRateController()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AccessInformation` | `canAccess(ThrottleContext throttleContext, java.lang.String consumerKey, java.lang.String roleID)` 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 Detail

    - #### RoleBasedAccessRateController

          public RoleBasedAccessRateController()

  - ### Method Detail

    - #### canAccess

          public AccessInformation canAccess(ThrottleContext throttleContext,
                                             java.lang.String consumerKey,
                                             java.lang.String roleID)
                                      throws ThrottleException

      To check whether caller can access not not base on the controlling policy
      Parameters:
        `throttleContext` - - current states of throttle - RunTime Data
        `roleID` - - Identifier for remote caller - ex: ip or domainname
      Returns:
        access information
      Throws:
        `ThrottleException`

Copyright © 2005-2022 Apache Software Foundation. All Rights Reserved.