public abstract class ThrottleContext extends Object
| Constructor and Description |
|---|
ThrottleContext(ThrottleConfiguration throttleConfiguration,
ThrottleReplicator throttleReplicator)
default constructor – expects a throttle configuration.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAndFlushCallerContext(CallerContext callerContext,
String id)
To add the caller and replicates the states of the given caller
|
CallerContext |
addCallerContext(CallerContext callerContext,
String id)
setting callerContext - put callersMap against time and
put time against remote caller id (ip/domain)
|
void |
flushCallerContext(CallerContext callerContext,
String id)
To replicates the states of the already exist caller
|
CallerContext |
getCallerContext(String id)
To get the runtime states of a remote caller
|
org.apache.axis2.context.ConfigurationContext |
getConfigurationContext() |
ThrottleConfiguration |
getThrottleConfiguration()
To get the ThrottleConfiguration
|
String |
getThrottleId() |
abstract int |
getType() |
void |
processCleanList(long time)
/**
processing cleaning list- only process callerContexts which unit time already had over
|
void |
removeAndFlushCaller(String id)
Removes the caller and repicate the states
|
void |
removeCallerContext(String id)
removing a caller with a given id - caller will remove from clean list
|
void |
setConfigurationContext(org.apache.axis2.context.ConfigurationContext configurationContext) |
void |
setThrottleId(String throttleId) |
public ThrottleContext(ThrottleConfiguration throttleConfiguration, ThrottleReplicator throttleReplicator)
throttleConfiguration - - configuration data according to the policypublic ThrottleConfiguration getThrottleConfiguration()
public CallerContext getCallerContext(String id)
id - the remote caller id ex: domain , ippublic CallerContext addCallerContext(CallerContext callerContext, String id)
callerContext - - The remote caller's runtime data.id - - The id of the remote callerpublic void removeCallerContext(String id)
id - Caller IDpublic void processCleanList(long time)
throws ThrottleException
time - - the current System TimeThrottleExceptionpublic void setThrottleId(String throttleId)
public String getThrottleId()
public org.apache.axis2.context.ConfigurationContext getConfigurationContext()
public void setConfigurationContext(org.apache.axis2.context.ConfigurationContext configurationContext)
public abstract int getType()
public void addAndFlushCallerContext(CallerContext callerContext, String id)
callerContext - The states of the callerid - The id of the callerpublic void flushCallerContext(CallerContext callerContext, String id)
callerContext - The states of the callerid - The id of the remote callerpublic void removeAndFlushCaller(String id)
id - The Id of the callerCopyright © 2005–2015 Apache Software Foundation. All rights reserved.