Hi Thilini,

On Wed, Jul 29, 2015 at 4:54 PM, Thilini Cooray <thili...@wso2.com> wrote:

> Hi,
>
> Is it possible to read throttle policy content and retrieve its elements?
>
> For an example consider following policy;
>
> <wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy";
>             
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
>             xmlns:throttle="http://www.wso2.org/products/wso2commons/throttle";
>             wsu:Id="WSO2MediatorThrottlingPolicy">
>     <throttle:MediatorThrottleAssertion>
>         
> <throttle:MaximumConcurrentAccess>10</throttle:MaximumConcurrentAccess>
>         <wsp:Policy>
>             <throttle:ID throttle:type="IP">other</throttle:ID>
>             <wsp:Policy>
>                 <throttle:Control>
>                     <wsp:Policy>
>                         <throttle:MaximumCount>10</throttle:MaximumCount>
>                         <throttle:UnitTime>800000</throttle:UnitTime>
>                         <throttle:ProhibitTimePeriod 
> wsp:Optional="true">10000</throttle:ProhibitTimePeriod>
>
>                         <wsp:Policy>
>                         <throttle:Attributes>
>                             <throttle:Attribute1>xxxx</throttle:Attribute1>
>                             <throttle:Attribute2>xxxx</throttle:Attribute2>
>                         </throttle:Attributes>
>                         </wsp:Policy>
>                     </wsp:Policy>
>                 </throttle:Control>
>             </wsp:Policy>
>         </wsp:Policy>
>     </throttle:MediatorThrottleAssertion>
> </wsp:Policy>
>
> Tier level attributes can be retrieved already.
> What I would like to clarify is whether there is any API to read policy
> elements such as  "throttle:MaximumCount" and their values?
>

Policy is read from apache neethi [1] and policy spec is defined in [2].
There are some more references in [3] and [4]. HTH

[1] http://ws.apache.org/neethi/
[2] http://www.w3.org/TR/ws-policy/
[3]
https://svn.wso2.org/repos/wso2/branches/commons/throttle/3.1/modules/core/src/main/java/org/wso2/throttle/ThrottlePolicyProcessor.java
[4] http://wso2.com/library/articles/wso2-throttling/#t3


>
> 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
>



-- 
Supun Malinga,

Senior Software Engineer,
WSO2 Inc.
http://wso2.com
email: sup...@wso2.com <sup...@wso2.com>
mobile: +94 (0)71 56 91 321
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to