Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM distribution 6.1.0-SNAPSHOT
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jbpm.runtime.manager.impl
Class SimpleRegisterableItemsFactory

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

All Implemented Interfaces:
  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 to define listeners and work item handlers by their class and whenever they will be required new instance will be created out of the given `Class` instance. It's construction is limited to only two options:

- default - no argument constructor
- single argument constructor of type `KieSession`

to populate this factory with class definitions use halper methods:

- addWorkItemHandler
- addProcessListener
- addAgendaListener
- addWorkingMemoryListener

Field Summary
`protected org.kie.internal.runtime.manager.InternalRuntimeManager` | `runtimeManager`

Constructor Summary
`SimpleRegisterableItemsFactory()`

Method Summary
`void` | `addAgendaListener(Class<? extends AgendaEventListener> clazz)`
`void` | `addGlobal(String name, Object global)`
`void` | `addProcessListener(Class<? extends ProcessEventListener> clazz)`
`void` | `addTaskListener(Class<? extends TaskLifeCycleEventListener> clazz)`
`void` | `addWorkingMemoryListener(Class<? extends RuleRuntimeEventListener> clazz)`
`void` | `addWorkItemHandler(String name, Class<? extends WorkItemHandler> clazz)`
`protected
`<T> T`
` | `createInstance(Class<T> clazz, RuntimeEngine engine)`
`List<AgendaEventListener>` | `getAgendaEventListeners(RuntimeEngine runtime)` Returns new instances of `AgendaEventListener` that will be registered on `RuntimeEngine`
`Map<String,Object>` | `getGlobals(RuntimeEngine runtime)` Returns globals that shall be registered on `KieSession`.
`List<ProcessEventListener>` | `getProcessEventListeners(RuntimeEngine runtime)` Returns new instances of `ProcessEventListener` that will be registered on `RuntimeEngine`
`List<RuleRuntimeEventListener>` | `getRuleRuntimeEventListeners(RuntimeEngine runtime)` Returns new instances of `RuleRuntimeEventListener` that will be registered on `RuntimeEngine`
`org.kie.internal.runtime.manager.InternalRuntimeManager` | `getRuntimeManager()`
`List<TaskLifeCycleEventListener>` | `getTaskListeners()` Return new instances of `TaskLifeCycleEventListener` that will be registered on `RuntimeEngine`.
`Map<String,WorkItemHandler>` | `getWorkItemHandlers(RuntimeEngine runtime)` Returns new instances of `WorkItemHandler` that will be registered on `RuntimeEngine`
`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,WorkItemHandler> getWorkItemHandlers(RuntimeEngine runtime)

  Description copied from interface: `RegisterableItemsFactory`
  Returns new instances of `WorkItemHandler` that will be registered on `RuntimeEngine`

  Specified by:
    `getWorkItemHandlers` in interface `RegisterableItemsFactory`
  Parameters:
    `runtime` - provides `RuntimeEngine` in case handler need to make use of it internally
  Returns:
    map of handlers to be registered - in case of no handlers empty map shall be returned.

### getProcessEventListeners

    public List<ProcessEventListener> getProcessEventListeners(RuntimeEngine runtime)

  Description copied from interface: `RegisterableItemsFactory`
  Returns new instances of `ProcessEventListener` that will be registered on `RuntimeEngine`

  Specified by:
    `getProcessEventListeners` in interface `RegisterableItemsFactory`
  Parameters:
    `runtime` - provides `RuntimeEngine` in case listeners need to make use of it internally
  Returns:
    list of listeners to be registered - in case of no listeners empty list shall be returned.

### getAgendaEventListeners

    public List<AgendaEventListener> getAgendaEventListeners(RuntimeEngine runtime)

  Description copied from interface: `RegisterableItemsFactory`
  Returns new instances of `AgendaEventListener` that will be registered on `RuntimeEngine`

  Specified by:
    `getAgendaEventListeners` in interface `RegisterableItemsFactory`
  Parameters:
    `runtime` - provides `RuntimeEngine` in case listeners need to make use of it internally
  Returns:
    list of listeners to be registered - in case of no listeners empty list shall be returned.

### getRuleRuntimeEventListeners

    public List<RuleRuntimeEventListener> getRuleRuntimeEventListeners(RuntimeEngine runtime)

  Description copied from interface: `RegisterableItemsFactory`
  Returns new instances of `RuleRuntimeEventListener` that will be registered on `RuntimeEngine`

  Specified by:
    `getRuleRuntimeEventListeners` in interface `RegisterableItemsFactory`
  Parameters:
    `runtime` - provides `RuntimeEngine` in case listeners need to make use of it internally
  Returns:
    list of listeners to be registered - in case of no listeners empty list shall be returned.

### getTaskListeners

    public List<TaskLifeCycleEventListener> getTaskListeners()

  Description copied from interface: `RegisterableItemsFactory`
  Return new instances of `TaskLifeCycleEventListener` that will be registered on `RuntimeEngine`.

  Specified by:
    `getTaskListeners` in interface `RegisterableItemsFactory`
  Returns:

### getGlobals

    public Map<String,Object> getGlobals(RuntimeEngine runtime)

  Description copied from interface: `RegisterableItemsFactory`
  Returns globals that shall be registered on `KieSession`.

  Specified by:
    `getGlobals` in interface `RegisterableItemsFactory`
  Parameters:
    `runtime` - provides `RuntimeEngine` in case globals need to make use of it internally
  Returns:
    map of globals to be registered - in case of no globals empty map shall be returned.

### addWorkItemHandler

    public void addWorkItemHandler(String name,
                                   Class<? extends WorkItemHandler> clazz)

### addProcessListener

    public void addProcessListener(Class<? extends ProcessEventListener> clazz)

### addAgendaListener

    public void addAgendaListener(Class<? extends AgendaEventListener> clazz)

### addWorkingMemoryListener

    public void addWorkingMemoryListener(Class<? extends RuleRuntimeEventListener> clazz)

### addGlobal

    public void addGlobal(String name,
                          Object global)

### addTaskListener

    public void addTaskListener(Class<? extends TaskLifeCycleEventListener> clazz)

### createInstance

    protected <T> T createInstance(Class<T> clazz,
                                   RuntimeEngine engine)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM distribution 6.1.0-SNAPSHOT
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.