On Thu, Jul 23, 2015 at 9:58 AM, Thilini Cooray <[email protected]> wrote:
> 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. > Its better if the name implies the usecase. "ignoreThrottle" might be confusing as per why we are ignoring it.. > > 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. > I see. Then you will have to add a flag to represent each case.. thanks, > > Thanks. > > On Wed, Jul 22, 2015 at 6:25 PM, Supun Malinga <[email protected]> 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 <[email protected]> >> 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 : [email protected] >>> >>> WSO2 Inc. www.wso2.com >>> lean.enterprise.middleware >>> >>> _______________________________________________ >>> Dev mailing list >>> [email protected] >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> Supun Malinga, >> >> Senior Software Engineer, >> WSO2 Inc. >> http://wso2.com >> email: [email protected] <[email protected]> >> 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 : [email protected] > > WSO2 Inc. www.wso2.com > lean.enterprise.middleware > -- Supun Malinga, Senior Software Engineer, WSO2 Inc. http://wso2.com email: [email protected] <[email protected]> mobile: +94 (0)71 56 91 321
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
