com.tibco.cep.runtime.session

## Interface RuleServiceProvider

-     public interface RuleServiceProvider

  Provides all services for one BE archive deployed on one engine. Services include `RuleRuntime`, `TypeManager`, etc.

  Each `RuleServiceProvider` is managed by one `RuleServiceProviderManager`.

  Since:
    2.0.0
  See Also:
    `RuleServiceProviderManager`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `MODE_API` In `MODE_API` all services are intialized, but only the rule sessions are started.
    `static int` | `MODE_CLUSTER` `MODE_CLUSTER` starts runtime in Cluster mode with all services are initialized and started.
    `static int` | `MODE_INIT` In `MODE_INIT` all services are initialized, but no service is started.
    `static int` | `MODE_LOAD_ONLY` In `MODE_LOAD_ONLY` only project, classes, Global Variable are loaded.
    `static int` | `MODE_PRIMARY` In `MODE_PRIMARY` all services are initialized and started.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `configure(int mode)` Initializes and starts this `RuleServiceProvider` in the given mode.
    `java.lang.ClassLoader` | `getClassLoader()` Gets the class loader used by deserialization and hot deployment.
    `GlobalVariables` | `getGlobalVariables()` Gets the `GlobalVariables` that manages all global variables in this `RuleServiceProvider`.
    `Logger` | `getLogger(java.lang.Class clazz)` Gets the `Logger` for a given module.
    `Logger` | `getLogger(java.lang.String name)` Gets the `Logger` for a given module.
    `java.lang.String` | `getName()` Gets the name under which this `RuleServiceProvider` is registered in its parent `RuleServiceProviderManager`.
    `java.util.Properties` | `getProperties()` Gets the properties used to build this `RuleServiceProvider`.
    `RuleRuntime` | `getRuleRuntime()` Returns the `RuleRuntime` that manages the rule sessions in this `RuleServiceProvider`.
    `TypeManager` | `getTypeManager()` Gets the `TypeManager` which manages all Ontology type definitions in this `RuleServiceProvider`.
    `void` | `shutdown()` Stops the components in the reverse order they were started.

- - ### Field Detail

    - #### MODE_LOAD_ONLY

          static final int MODE_LOAD_ONLY

      In `MODE_LOAD_ONLY` only project, classes, Global Variable are loaded.
      Since:
        2.0.0
      See Also:
        Constant Field Values

    - #### MODE_INIT

          static final int MODE_INIT

      In `MODE_INIT` all services are initialized, but no service is started.
      Since:
        2.0.0
      See Also:
        Constant Field Values

    - #### MODE_API

          static final int MODE_API

      In `MODE_API` all services are intialized, but only the rule sessions are started.
      Since:
        2.0.0
      See Also:
        Constant Field Values

    - #### MODE_PRIMARY

          static final int MODE_PRIMARY

      In `MODE_PRIMARY` all services are initialized and started.
      Since:
        2.0.0
      See Also:
        Constant Field Values

    - #### MODE_CLUSTER

          static final int MODE_CLUSTER

      `MODE_CLUSTER` starts runtime in Cluster mode with all services are initialized and started.
      Since:
        3.0.2
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### configure

          void configure(int mode)

      Initializes and starts this `RuleServiceProvider` in the given mode.
      Parameters:
        `mode` - one of MODE_API, MODE_INIT, MODE_PRIMARY, MODE_LOAD_ONLY
      Throws:
        `java.lang.Exception`
      See Also:
        `RuleServiceProvider.MODE_API`, `RuleServiceProvider.MODE_INIT`, `RuleServiceProvider.MODE_PRIMARY`, `RuleServiceProvider.MODE_LOAD_ONLY`

    - #### getClassLoader

          java.lang.ClassLoader getClassLoader()

      Gets the class loader used by deserialization and hot deployment.
      Returns:
        a `ClassLoader`.
      Since:
        2.0.0

    - #### getGlobalVariables

          GlobalVariables getGlobalVariables()

      Gets the `GlobalVariables` that manages all global variables in this `RuleServiceProvider`.
      Returns:
        a GlobalVariables.
      Since:
        2.0.0

    - #### getLogger

          Logger getLogger(java.lang.String name)

      Gets the `Logger` for a given module.
      Parameters:
        `name` - String name of the module.
      Returns:
        a `Logger`.
      Since:
        4.0.0

    - #### getLogger

          Logger getLogger(java.lang.Class clazz)

      Gets the `Logger` for a given module.
      Parameters:
        `clazz` - Class used to determine the module.
      Returns:
        a `Logger`.
      Since:
        4.0.0

    - #### getName

          java.lang.String getName()

      Gets the name under which this `RuleServiceProvider` is registered in its parent `RuleServiceProviderManager`.
      Returns:
        a `String`.
      Since:
        2.0

    - #### getProperties

          java.util.Properties getProperties()

      Gets the properties used to build this `RuleServiceProvider`.
      Returns:
        a `Properties`.
      Since:
        2.0.0

    - #### getRuleRuntime

          RuleRuntime getRuleRuntime()

      Returns the `RuleRuntime` that manages the rule sessions in this `RuleServiceProvider`.
      Returns:
        A `RuleRuntime`.
      Since:
        2.0.0

    - #### getTypeManager

          TypeManager getTypeManager()

      Gets the `TypeManager` which manages all Ontology type definitions in this `RuleServiceProvider`.
      Returns:
        a `TypeManager`.
      Since:
        2.0.0

    - #### shutdown

          void shutdown()

      Stops the components in the reverse order they were started. Valid only when running in a MODE_PRIMARY. For API and INIT Mode it is a no-op.
      Since:
        2.0.0