org.apache.synapse.commons.throttle.core.factory

## 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 and Description
    `ThrottleContextFactory()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ThrottleContext` | `createThrottleContext(int throttletype, ThrottleConfiguration configuration)` To create a ThrottleContext for the given throttle type Needs to provide a throttle configuration
    `static ThrottleContextCleanupTask` | `getThrottleContextCleanupTaskInstance()` Get throttle caller context cleanup task instance implementation
    `static ThrottleWindowReplicator` | `getThrottleWindowReplicatorInstance()` Ger throttle window replicator instance to make sure that there will be one throttle replicator in the implementation

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ThrottleContextFactory

          public ThrottleContextFactory()

  - ### 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 throttle
        `configuration` - - 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

Copyright © 2005–2018 Apache Software Foundation. All rights reserved.