Class RoleBasedAccessRateController
java.lang.Object
org.apache.synapse.commons.throttle.core.RoleBasedAccessRateController
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 -
Method Summary
Modifier and TypeMethodDescriptioncanAccess(ThrottleContext throttleContext, String consumerKey, String roleID) To check whether caller can access not not base on the controlling policycanAccess(ThrottleContext throttleContext, String consumerKey, String roleID, Long eventCount)
-
Constructor Details
-
RoleBasedAccessRateController
public RoleBasedAccessRateController()
-
-
Method Details
-
canAccess
public AccessInformation canAccess(ThrottleContext throttleContext, String consumerKey, String roleID) throws ThrottleException To check whether caller can access not not base on the controlling policy- Parameters:
throttleContext- - current states of throttle - RunTime DataroleID- - Identifier for remote caller - ex: ip or domainname- Returns:
- access information
- Throws:
ThrottleException
-
canAccess
public AccessInformation canAccess(ThrottleContext throttleContext, String consumerKey, String roleID, Long eventCount) throws ThrottleException - Throws:
ThrottleException
-