com.tibco.cep.runtime.session

## Class RuleServiceProviderManager

- java.lang.Object
- - com.tibco.cep.runtime.session.RuleServiceProviderManager

-     public class RuleServiceProviderManager
      extends java.lang.Object

  Manages the `RuleServiceProvider` instances. This is the entry point for most API operations.

  You can obtain an instance of this class with the static method `getInstance`.

  Since:
    2.0
  See Also:
    `RuleServiceProvider`

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static RuleServiceProviderManager` | `getInstance()` Gets the singleton instance of this class.
    `RuleServiceProvider` | `getProvider(java.lang.String instanceName)` Gets by name a `RuleServiceProvider` managed by this `RuleServiceProviderManager`.
    `java.util.Collection` | `getRuleServiceProviders()` Gets all the `RuleServiceProvider` contained in this `RuleServiceProviderManager`.
    `RuleServiceProvider` | `newProvider(java.lang.String instanceName, java.util.Properties env)` Creates and registers a new `RuleServiceProvider` in API mode.
    `void` | `removeProvider(java.lang.String instanceName)` Removes the `RuleServiceProvider` of the given name, if it exists, from this `RuleServiceProviderManager`.

- - ### Method Detail

    - #### getInstance

          public static RuleServiceProviderManager getInstance()

      Gets the singleton instance of this class.
      Returns:
        An instance of `RuleServiceProviderManager`.
      Since:
        2.0

    - #### getProvider

          public RuleServiceProvider getProvider(java.lang.String instanceName)

      Gets by name a `RuleServiceProvider` managed by this `RuleServiceProviderManager`.
      Parameters:
        `instanceName` - Name of the `RuleServiceProvider` to get.
      Returns:
        The `RuleServiceProvider` of the given name if found in this `RuleServiceProviderManager`, else null.
      Since:
        2.0

    - #### getRuleServiceProviders

          public java.util.Collection getRuleServiceProviders()

      Gets all the `RuleServiceProvider` contained in this `RuleServiceProviderManager`.
      Returns:
        A Collection of `RuleServiceProvider`.
      Since:
        2.0

    - #### newProvider

          public RuleServiceProvider newProvider(java.lang.String instanceName,
                                                 java.util.Properties env)

      Creates and registers a new `RuleServiceProvider` in API mode.

      You must provide the name of the configuration file in the property `"be.bootstrap.property.file"`. For example:

      `Properties p = new Properties;
      p.put("be.bootstrap.property.file", "my_engine.tra");
      RuleServiceProviderManager.getInstance().newProvider("my_rsp", p);`

      Parameters:
        `instanceName` - Name given to the new `RuleServiceProvider`.
        `env` - `Properties` used to build the new `RuleServiceProvider`.
      Returns:
        A new `RuleServiceProvider`.
      Throws:
        `java.lang.Exception` - when `instanceName` is the name of an existing `RuleServiceProvider`.
      Since:
        2.0

    - #### removeProvider

          public void removeProvider(java.lang.String instanceName)

      Removes the `RuleServiceProvider` of the given name, if it exists, from this `RuleServiceProviderManager`.
      Parameters:
        `instanceName` - Name of the `RuleServiceProvider` to remove.
      Since:
        2.0