Class ThrottleContextFactory
java.lang.Object
org.apache.synapse.commons.throttle.core.factory.ThrottleContextFactory
Factory for creating a ThrottleContext - holds all callers runtime data - the current state
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ThrottleContextcreateThrottleContext(int throttletype, ThrottleConfiguration configuration) To create a ThrottleContext for the given throttle type Needs to provide a throttle configurationstatic ThrottleContextCleanupTaskGet throttle caller context cleanup task instance implementationstatic ThrottleWindowReplicatorGer throttle window replicator instance to make sure that there will be one throttle replicator in the implementationstatic UnifiedThrottleReplicatorGet the unified throttle replicator instance to make sure there is one unified replicator in the implementation
-
Constructor Details
-
ThrottleContextFactory
public ThrottleContextFactory()
-
-
Method Details
-
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
Ger throttle window replicator instance to make sure that there will be one throttle replicator in the implementation- Returns:
- ThrottleWindowReplicator instance
-
getUnifiedThrottleReplicatorInstance
Get the unified throttle replicator instance to make sure there is one unified replicator in the implementation- Returns:
- UnifiedThrottleReplicator instance
-
getThrottleContextCleanupTaskInstance
Get throttle caller context cleanup task instance implementation- Returns:
- ThrottleWindowReplicator instance
-