public class ThrottleConfigAdminService
extends org.wso2.carbon.core.AbstractAdmin
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.axis2.engine.AxisConfiguration |
axisConfig |
| Constructor and Description |
|---|
ThrottleConfigAdminService()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
disableThrottling(String serviceName)
Disengage Throttling module from the specified service
|
void |
disengageGlobalThrottling()
Disengage throttling globally
|
boolean |
disengageThrottlingForOperation(String serviceName,
String operationName)
Disengages throttling from an operation
|
void |
enableThrottling(String serviceName,
ThrottlePolicy policy)
Engages Throttling for the given serviceName by generating the policy
according to the specified parameters
|
boolean |
engageThrottlingForOperation(ThrottlePolicy policy,
String serviceName,
String operationName)
Engage throttling for the given operation
|
ThrottlePolicy |
getGlobalPolicyConfigs() |
ThrottlePolicy |
getOperationPolicyConfigs(String serviceName,
String operationName) |
ThrottlePolicy |
getPolicyConfigs(String serviceName)
Gives the current policy config as a ThrottlePolicy
|
void |
globallyEngageThrottling(ThrottlePolicy policy)
Engages throttling globally.
|
String |
throttlePolicyToString(ThrottlePolicy policy) |
ThrottlePolicy |
toThrottlePolicy(String policyXML) |
getAxisConfig, getConfigContext, getConfigSystemRegistry, getConfigUserRegistry, getGovernanceRegistry, getGovernanceSystemRegistry, getGovernanceUserRegistry, getHttpSession, getLocalRepo, getRegistry, getTenantDomain, getUsername, getUserRealm, setConfigurationContext, setPermissionUpdateTimestamppublic ThrottleConfigAdminService()
public void enableThrottling(String serviceName, ThrottlePolicy policy) throws org.apache.axis2.AxisFault, ThrottleComponentException
serviceName - - name of the serviceName to engage throttlingpolicy - - object containg policy configurationsorg.apache.axis2.AxisFault - - if an error is occured when accessing axisConfig or axisServiceThrottleComponentException - - throttle component specific errorspublic void globallyEngageThrottling(ThrottlePolicy policy) throws org.apache.axis2.AxisFault, ThrottleComponentException
policy - - policy configuration to be usedorg.apache.axis2.AxisFault - - if error occured when dealing with axisConfigThrottleComponentException - - throttle component specific errorspublic boolean engageThrottlingForOperation(ThrottlePolicy policy, String serviceName, String operationName) throws org.apache.axis2.AxisFault, ThrottleComponentException
policy - - throttle configserviceName - - name of the service which contains the operationoperationName - - operation nameorg.apache.axis2.AxisFault - - on axis errorThrottleComponentException - - throttle specific errorpublic boolean disengageThrottlingForOperation(String serviceName, String operationName) throws ThrottleComponentException
serviceName - - name of the service which contains the operationoperationName - - operation nameThrottleComponentException - - on errorpublic void disableThrottling(String serviceName) throws ThrottleComponentException
serviceName - - name of the service of which throttling should be desabledThrottleComponentException - - error in disablingpublic void disengageGlobalThrottling()
throws ThrottleComponentException
ThrottleComponentException - - component specific errorpublic ThrottlePolicy getPolicyConfigs(String serviceName) throws org.apache.axis2.AxisFault, ThrottleComponentException
serviceName - - name of the service of which configs are neededorg.apache.axis2.AxisFault - - error in accessing axisConfig or axis serviceThrottleComponentException - - policy config retrieving errorpublic ThrottlePolicy getGlobalPolicyConfigs() throws org.apache.axis2.AxisFault, ThrottleComponentException
org.apache.axis2.AxisFaultThrottleComponentExceptionpublic ThrottlePolicy getOperationPolicyConfigs(String serviceName, String operationName) throws org.apache.axis2.AxisFault, ThrottleComponentException
org.apache.axis2.AxisFaultThrottleComponentExceptionpublic ThrottlePolicy toThrottlePolicy(String policyXML) throws ThrottleComponentException
ThrottleComponentExceptionpublic String throttlePolicyToString(ThrottlePolicy policy) throws ThrottleComponentException
ThrottleComponentExceptionCopyright © 2019 WSO2. All rights reserved.