org.kie.api.runtime

## Interface KieContainerSessionsPool

- All Superinterfaces:
    KieSessionsPool

      public interface KieContainerSessionsPool
      extends KieSessionsPool

  A pool of session created from a KieContainer

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `KieSession` | `newKieSession(String kSessionName)` Obtain a `KieSession` with the given name from this pool.
    `KieSession` | `newKieSession(String kSessionName, KieSessionConfiguration conf)` Obtain a `KieSession` with the given name and configuration from this pool.
    `StatelessKieSession` | `newStatelessKieSession(String kSessionName)` Obtain a `StatelessKieSession` with the given name from this pool.
    `StatelessKieSession` | `newStatelessKieSession(String kSessionName, KieSessionConfiguration conf)` Obtain a `StatelessKieSession` with the given name and configuration from this pool.

    - ### Methods inherited from interface org.kie.api.runtime.KieSessionsPool

      `newKieSession, newKieSession, newStatelessKieSession, newStatelessKieSession, shutdown`

- - ### Method Detail

    - #### newKieSession

          KieSession newKieSession(String kSessionName)

      Obtain a `KieSession` with the given name from this pool. Calling `KieSession.dispose()` on this session when you are done will push it back into the pool.
      Returns:
        created `KieSession`
      Throws:
        `RuntimeException` - if the KieContainer doesn't have any KieSession with the given name

    - #### newKieSession

          KieSession newKieSession(String kSessionName,
                                   KieSessionConfiguration conf)

      Obtain a `KieSession` with the given name and configuration from this pool. Calling `KieSession.dispose()` on this session when you are done will push it back into the pool.
      Returns:
        created `KieSession`
      Throws:
        `RuntimeException` - if the KieContainer doesn't have any KieSession with the given name

    - #### newStatelessKieSession

          StatelessKieSession newStatelessKieSession(String kSessionName)

      Obtain a `StatelessKieSession` with the given name from this pool. Note that, what is pooled here is not `StatelessKieSession` but the `KieSession` that it internally wraps, so calling multiple times `CommandExecutor.execute(Command)` ()} (or one of its overload) will make this `StatelessKieSession` to get a `KieSession` from the pool instead of creating a new one.
      Returns:
        created `StatelessKieSession`
      Throws:
        `RuntimeException` - if this KieContainer doesn't have any StatelessKieSession with the given name

    - #### newStatelessKieSession

          StatelessKieSession newStatelessKieSession(String kSessionName,
                                                     KieSessionConfiguration conf)

      Obtain a `StatelessKieSession` with the given name and configuration from this pool. Note that, what is pooled here is not `StatelessKieSession` but the `KieSession` that it internally wraps, so calling multiple times `CommandExecutor.execute(Command)` ()} (or one of its overload) will make this `StatelessKieSession` to get a `KieSession` from the pool instead of creating a new one.
      Returns:
        created `StatelessKieSession`
      Throws:
        `RuntimeException` - if this KieContainer doesn't have any StatelessKieSession with the given name

Copyright © 2001–2019 JBoss by Red Hat. All rights reserved.