org.jbpm.runtime.manager.impl

## Class SimpleRegisterableItemsFactory

- java.lang.Object
- - org.jbpm.runtime.manager.impl.SimpleRegisterableItemsFactory

- All Implemented Interfaces:
    org.kie.api.runtime.manager.RegisterableItemsFactory, org.kie.internal.runtime.manager.InternalRegisterableItemsFactory
  Direct Known Subclasses:
    DefaultRegisterableItemsFactory

      public class SimpleRegisterableItemsFactory
      extends Object
      implements org.kie.internal.runtime.manager.InternalRegisterableItemsFactory

  The most basic `RegisterableItemsFactory` implementation that allows us to define listeners and work item handlers by their class. Whenever they are required, new instance will be created based on the given `Class` instance. It's construction is limited by two (and only two) options:
  - default - no argument constructor
  - single argument constructor of type `KieSession`
  To populate this factory with class definitions, use helper methods:
  - addWorkItemHandler
  - addProcessListener
  - addAgendaListener
  - addWorkingMemoryListener

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected org.kie.internal.runtime.manager.InternalRuntimeManager` | `runtimeManager`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleRegisterableItemsFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAgendaListener(Class<? extends org.kie.api.event.rule.AgendaEventListener> clazz)`
    `void` | `addGlobal(String name, Object global)`
    `void` | `addProcessListener(Class<? extends org.kie.api.event.process.ProcessEventListener> clazz)`
    `void` | `addTaskListener(Class<? extends org.kie.api.task.TaskLifeCycleEventListener> clazz)`
    `void` | `addWorkingMemoryListener(Class<? extends org.kie.api.event.rule.RuleRuntimeEventListener> clazz)`
    `void` | `addWorkItemHandler(String name, Class<? extends org.kie.api.runtime.process.WorkItemHandler> clazz)`
    `protected <T> T` | `createInstance(Class<T> clazz, org.kie.api.runtime.manager.RuntimeEngine engine)`
    `List<org.kie.api.event.rule.AgendaEventListener>` | `getAgendaEventListeners(org.kie.api.runtime.manager.RuntimeEngine runtime)`
    `Map<String,Object>` | `getGlobals(org.kie.api.runtime.manager.RuntimeEngine runtime)`
    `List<org.kie.api.event.process.ProcessEventListener>` | `getProcessEventListeners(org.kie.api.runtime.manager.RuntimeEngine runtime)`
    `List<org.kie.api.event.rule.RuleRuntimeEventListener>` | `getRuleRuntimeEventListeners(org.kie.api.runtime.manager.RuntimeEngine runtime)`
    `org.kie.internal.runtime.manager.InternalRuntimeManager` | `getRuntimeManager()`
    `List<org.kie.api.task.TaskLifeCycleEventListener>` | `getTaskListeners()`
    `Map<String,org.kie.api.runtime.process.WorkItemHandler>` | `getWorkItemHandlers(org.kie.api.runtime.manager.RuntimeEngine runtime)`
    `void` | `setRuntimeManager(org.kie.internal.runtime.manager.InternalRuntimeManager runtimeManager)`

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

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

- - ### Field Detail

    - #### runtimeManager

          protected org.kie.internal.runtime.manager.InternalRuntimeManager runtimeManager

  - ### Constructor Detail

    - #### SimpleRegisterableItemsFactory

          public SimpleRegisterableItemsFactory()

  - ### Method Detail

    - #### getRuntimeManager

          public org.kie.internal.runtime.manager.InternalRuntimeManager getRuntimeManager()

      Specified by:
        `getRuntimeManager` in interface `org.kie.internal.runtime.manager.InternalRegisterableItemsFactory`

    - #### setRuntimeManager

          public void setRuntimeManager(org.kie.internal.runtime.manager.InternalRuntimeManager runtimeManager)

      Specified by:
        `setRuntimeManager` in interface `org.kie.internal.runtime.manager.InternalRegisterableItemsFactory`

    - #### getWorkItemHandlers

          public Map<String,org.kie.api.runtime.process.WorkItemHandler> getWorkItemHandlers(org.kie.api.runtime.manager.RuntimeEngine runtime)

      Specified by:
        `getWorkItemHandlers` in interface `org.kie.api.runtime.manager.RegisterableItemsFactory`

    - #### getProcessEventListeners

          public List<org.kie.api.event.process.ProcessEventListener> getProcessEventListeners(org.kie.api.runtime.manager.RuntimeEngine runtime)

      Specified by:
        `getProcessEventListeners` in interface `org.kie.api.runtime.manager.RegisterableItemsFactory`

    - #### getAgendaEventListeners

          public List<org.kie.api.event.rule.AgendaEventListener> getAgendaEventListeners(org.kie.api.runtime.manager.RuntimeEngine runtime)

      Specified by:
        `getAgendaEventListeners` in interface `org.kie.api.runtime.manager.RegisterableItemsFactory`

    - #### getRuleRuntimeEventListeners

          public List<org.kie.api.event.rule.RuleRuntimeEventListener> getRuleRuntimeEventListeners(org.kie.api.runtime.manager.RuntimeEngine runtime)

      Specified by:
        `getRuleRuntimeEventListeners` in interface `org.kie.api.runtime.manager.RegisterableItemsFactory`

    - #### getTaskListeners

          public List<org.kie.api.task.TaskLifeCycleEventListener> getTaskListeners()

      Specified by:
        `getTaskListeners` in interface `org.kie.api.runtime.manager.RegisterableItemsFactory`

    - #### getGlobals

          public Map<String,Object> getGlobals(org.kie.api.runtime.manager.RuntimeEngine runtime)

      Specified by:
        `getGlobals` in interface `org.kie.api.runtime.manager.RegisterableItemsFactory`

    - #### addWorkItemHandler

          public void addWorkItemHandler(String name,
                                         Class<? extends org.kie.api.runtime.process.WorkItemHandler> clazz)

    - #### addProcessListener

          public void addProcessListener(Class<? extends org.kie.api.event.process.ProcessEventListener> clazz)

    - #### addAgendaListener

          public void addAgendaListener(Class<? extends org.kie.api.event.rule.AgendaEventListener> clazz)

    - #### addWorkingMemoryListener

          public void addWorkingMemoryListener(Class<? extends org.kie.api.event.rule.RuleRuntimeEventListener> clazz)

    - #### addGlobal

          public void addGlobal(String name,
                                Object global)

    - #### addTaskListener

          public void addTaskListener(Class<? extends org.kie.api.task.TaskLifeCycleEventListener> clazz)

    - #### createInstance

          protected <T> T createInstance(Class<T> clazz,
                                         org.kie.api.runtime.manager.RuntimeEngine engine)

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