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

## Class CallerContextFactory

- java.lang.Object
- - org.apache.synapse.commons.throttle.core.factory.CallerContextFactory

-     public class CallerContextFactory
      extends Object

  Factory for creating a CallerContext

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CallerContextFactory()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static CallerContext` | `createCaller(int throttletype, String id)` To create a CallerContext(the run time data holder for a remote caller) for the given throttle type.

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

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

- - ### Constructor Detail

    - #### CallerContextFactory

          public CallerContextFactory()

  - ### Method Detail

    - #### createCaller

          public static CallerContext createCaller(int throttletype,
                                   String id)
                                            throws ThrottleException

      To create a CallerContext(the run time data holder for a remote caller) for the given throttle type. Needs to provide the ID(ip | domain) of the remote caller (ip/domain according to the policy)
      Parameters:
        `throttletype` - - The type of the throttle
        `id` - - The id of the caller
      Returns:
        caller - The corresponding caller context for the given throttle type
      Throws:
        `ThrottleException` - - Throws for if the throttle type is unknown

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