Package org.kie.internal.runtime.manager

## Interface InternalRuntimeManager

- All Superinterfaces:
    `org.kie.api.runtime.manager.RuntimeManager`

      public interface InternalRuntimeManager
      extends org.kie.api.runtime.manager.RuntimeManager

  Extension to stable API of RuntimeManager that provides additional capabilities that eventually will get propagated to main interface.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `activate()` | Activates this runtime manager by making sure it will be available for execution.
    `void` | `deactivate()` | Deactivates this runtime manager by making it only available for already running instances.
    `CacheManager` | `getCacheManager()` | Retrieves instance of cache manager
    `DeploymentDescriptor` | `getDeploymentDescriptor()` | Returns current deployment descriptor for this instance of RuntimeManager, might be null if descriptors are not used
    `RuntimeEnvironment` | `getEnvironment()` | Returns the actual environment used by the `RuntimeManager`
    `org.kie.api.runtime.KieContainer` | `getKieContainer()` | Returns KieContainer associated with this runtime manager if any
    `boolean` | `hasSecurityManager()` | Determines if there is security manager configured
    `boolean` | `isClosed()` | Indicates if the runtime manager is closed.
    `void` | `setCacheManager​(CacheManager cacheManager)` | Sets CacheManager to be used for manager scoped cacheable items
    `void` | `setDeploymentDescriptor​(DeploymentDescriptor descriptor)` | Sets deployment descriptor for this instance of RuntimeManager
    `void` | `setKieContainer​(org.kie.api.runtime.KieContainer kieContainer)` | Sets KieContainer to be associated with this runtime manager
    `void` | `setSecurityManager​(SecurityManager securityManager)` | Sets Security Manager to be used by this instance of RuntimeManager
    `void` | `validate​(org.kie.api.runtime.KieSession ksession, org.kie.api.runtime.manager.Context<?> context)` | Validates if given `KieSession` is eligible to be used with given context.

    - ### Methods inherited from interface org.kie.api.runtime.manager.RuntimeManager

      `close, disposeRuntimeEngine, getIdentifier, getRuntimeEngine, signalEvent`

- - ### Method Detail

    - #### validate

          void validate​(org.kie.api.runtime.KieSession ksession,
                        org.kie.api.runtime.manager.Context<?> context)
                 throws IllegalStateException

      Validates if given `KieSession` is eligible to be used with given context.
      Parameters:
        `ksession` - instance of `KieSession`
        `context` - instance of `Context`
      Throws:
        `IllegalStateException` - in case validation fails

    - #### getEnvironment

          RuntimeEnvironment getEnvironment()

      Returns the actual environment used by the `RuntimeManager`
      Returns:

    - #### isClosed

          boolean isClosed()

      Indicates if the runtime manager is closed.
      Returns:
        true if runtime manager is closed (close method was invoked on it) otherwise false

    - #### getDeploymentDescriptor

          DeploymentDescriptor getDeploymentDescriptor()

      Returns current deployment descriptor for this instance of RuntimeManager, might be null if descriptors are not used
      Returns:

    - #### setDeploymentDescriptor

          void setDeploymentDescriptor​(DeploymentDescriptor descriptor)

      Sets deployment descriptor for this instance of RuntimeManager
      Parameters:
        `descriptor` -

    - #### setSecurityManager

          void setSecurityManager​(SecurityManager securityManager)

      Sets Security Manager to be used by this instance of RuntimeManager
      Parameters:
        `securityManager` -

    - #### setCacheManager

          void setCacheManager​(CacheManager cacheManager)

      Sets CacheManager to be used for manager scoped cacheable items
      Parameters:
        `cacheManager` -

    - #### getCacheManager

          CacheManager getCacheManager()

      Retrieves instance of cache manager
      Returns:

    - #### getKieContainer

          org.kie.api.runtime.KieContainer getKieContainer()

      Returns KieContainer associated with this runtime manager if any
      Returns:

    - #### setKieContainer

          void setKieContainer​(org.kie.api.runtime.KieContainer kieContainer)

      Sets KieContainer to be associated with this runtime manager
      Parameters:
        `kieContainer` -

    - #### activate

          void activate()

      Activates this runtime manager by making sure it will be available for execution. This is default when creating new instance unless it was already marked as deactivated.

    - #### deactivate

          void deactivate()

      Deactivates this runtime manager by making it only available for already running instances.

    - #### hasSecurityManager

          boolean hasSecurityManager()

      Determines if there is security manager configured