Hi,

We are going to add an attribute to tier policies such as "ignoreThrottle"
(attribute name not finalized). If this attribute is enabled for a
particular tier policy, throttled out requests will not be halt.

For this particular scenario, we want to filter out requests which
throttled out because its allocated quota is exceeded. While going through
the source of RoleBasedAccessRateController I was able to identify that
"exceeding quota" is not the only reason for becoming
AccessInformation.isAccessAllowed = false.
That is why I wanted to clarify.

Thanks.

On Wed, Jul 22, 2015 at 6:25 PM, Supun Malinga <sup...@wso2.com> wrote:

> Hi,
>
> For the moment this would be the way to filter out the cause. But the
> better approach would be to set a flag in AccessInformation class on the
> respective error type. For this we need to improve AccessInformation
> class.
>
> May I know your use case ?.
>
> thanks,
>
> On Wed, Jul 22, 2015 at 11:37 AM, Thilini Cooray <thili...@wso2.com>
> wrote:
>
>> Hi,
>>
>> I would like to have a little clarification regarding canAccess method
>> in RoleBasedAccessRateController of org.wso2.carbon.throttle.core.
>>
>> Consider following example
>>           AccessInformation info =
>> roleBasedAccessControler.canAccess(throttleContext, consumerKey,
>> throttleId);
>>
>> I want to filter out the situation where info.isAccessAllowed() = false due
>> to the reason "exceeded the allocated quota".
>>
>> Is there a more suitable approach to do this check other than info.
>> getFaultReason().contains("exceeded the allocated quota")?
>>
>> Thanks.
>>
>> --
>> Best Regards,
>>
>> *Thilini Cooray*
>> Software Engineer
>> Mobile : +94 (0) 774 570 112 <%2B94%20%280%29%20773%20451194>
>> E-mail : thili...@wso2.com
>>
>> WSO2 Inc. www.wso2.com
>> lean.enterprise.middleware
>>
>> _______________________________________________
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Supun Malinga,
>
> Senior Software Engineer,
> WSO2 Inc.
> http://wso2.com
> email: sup...@wso2.com <sup...@wso2.com>
> mobile: +94 (0)71 56 91 321
>



-- 
Best Regards,

*Thilini Cooray*
Software Engineer
Mobile : +94 (0) 774 570 112 <%2B94%20%280%29%20773%20451194>
E-mail : thili...@wso2.com

WSO2 Inc. www.wso2.com
lean.enterprise.middleware
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to