Class ThrottleContextFactory
- java.lang.Object
-
- org.apache.synapse.commons.throttle.core.factory.ThrottleContextFactory
-
public class ThrottleContextFactory extends Object
Factory for creating a ThrottleContext - holds all callers runtime data - the current state
-
-
Constructor Summary
Constructors Constructor Description ThrottleContextFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ThrottleContextcreateThrottleContext(int throttletype, ThrottleConfiguration configuration)To create a ThrottleContext for the given throttle type Needs to provide a throttle configurationstatic ThrottleContextCleanupTaskgetThrottleContextCleanupTaskInstance()Get throttle caller context cleanup task instance implementationstatic ThrottleWindowReplicatorgetThrottleWindowReplicatorInstance()Ger throttle window replicator instance to make sure that there will be one throttle replicator in the implementation
-
-
-
Method Detail
-
createThrottleContext
public static ThrottleContext createThrottleContext(int throttletype, ThrottleConfiguration configuration) throws ThrottleException
To create a ThrottleContext for the given throttle type Needs to provide a throttle configuration- Parameters:
throttletype- - The type of the throttleconfiguration- - The throttle configuration- Returns:
- ThrottleContext - The corresponding ThrottleContext for the given throttle type
- Throws:
ThrottleException- - Throws for if the throttle type is unknown
-
getThrottleWindowReplicatorInstance
public static ThrottleWindowReplicator getThrottleWindowReplicatorInstance()
Ger throttle window replicator instance to make sure that there will be one throttle replicator in the implementation- Returns:
- ThrottleWindowReplicator instance
-
getThrottleContextCleanupTaskInstance
public static ThrottleContextCleanupTask getThrottleContextCleanupTaskInstance()
Get throttle caller context cleanup task instance implementation- Returns:
- ThrottleWindowReplicator instance
-
-