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

## org.jbpm.runtime.manager.impl.cdi
Class InjectableRegisterableItemsFactory

    java.lang.Object
      org.jbpm.runtime.manager.impl.SimpleRegisterableItemsFactory
          org.jbpm.runtime.manager.impl.DefaultRegisterableItemsFactory
              org.jbpm.runtime.manager.impl.cdi.InjectableRegisterableItemsFactory

All Implemented Interfaces:
  RegisterableItemsFactory

    public class InjectableRegisterableItemsFactory

extends DefaultRegisterableItemsFactory

Implementation of `RegisterableItemsFactory` dedicated to CDI environments that allows to get injections of following components:

- `ExternalTaskEventListener` - required bean
- `WorkItemHandlerProducer` - optional bean (0 or more)
- `EventListenerProducer>` - optional bean (0 or more)
- `EventListenerProducer>` - optional bean (0 or more)
- `EventListenerProducer>` - optional bean (0 or more)
- `RuntimeFinder` - optional required only when single CDI bean is going to manage many `RuntimeManager` instances

In addition to that, `AbstractAuditLogger` can be set after bean has been injected if the default is not sufficient. Although this factory extends `DefaultRegisterableItemsFactory` it will not use any of the listeners and handlers that comes from the super class. It mainly relies on CDI injections where the only exception from this rule is `AbstractAuditLogger`
Even though this is fully qualified bean for injection it provides helper methods to build its instances using `BeanManager` in case more independent instances are required.

- getFactory(BeanManager, AbstractAuditLogger)
- getFactory(BeanManager, AbstractAuditLogger, KieContainer, String)

Constructor Summary
`InjectableRegisterableItemsFactory()`

Method Summary
`List<AgendaEventListener>` | `getAgendaEventListeners(RuntimeEngine runtime)` Returns new instances of `AgendaEventListener` that will be registered on `RuntimeEngine`
`AbstractAuditLogger` | `getAuditlogger()`
`static RegisterableItemsFactory` | `getFactory(javax.enterprise.inject.spi.BeanManager beanManager, AbstractAuditLogger auditlogger)` Allows to create instance of this class dynamically via `BeanManager`.
`static RegisterableItemsFactory` | `getFactory(javax.enterprise.inject.spi.BeanManager beanManager, AbstractAuditLogger auditlogger, KieContainer kieContainer, String ksessionName)` Allows to create instance of this class dynamically via `BeanManager`.
`protected WorkItemHandler` | `getHTWorkItemHandler(RuntimeEngine runtime)`
`protected static
`<T> T`
` | `getInstanceByType(javax.enterprise.inject.spi.BeanManager manager, Class<T> type, Annotation... bindings)`
`KieContainer` | `getKieContainer()`
`String` | `getKsessionName()`
`protected Map<String,Object>` | `getParametersMap(RuntimeEngine runtime)`
`List<ProcessEventListener>` | `getProcessEventListeners(RuntimeEngine runtime)` Returns new instances of `ProcessEventListener` that will be registered on `RuntimeEngine`
`List<WorkingMemoryEventListener>` | `getWorkingMemoryEventListeners(RuntimeEngine runtime)` Returns new instances of `RuleRuntimeEventListener` that will be registered on `RuntimeEngine`
`Map<String,WorkItemHandler>` | `getWorkItemHandlers(RuntimeEngine runtime)` Returns new instances of `WorkItemHandler` that will be registered on `RuntimeEngine`
`void` | `setAuditlogger(AbstractAuditLogger auditlogger)`
`void` | `setKieContainer(KieContainer kieContainer)`
`void` | `setKsessionName(String ksessionName)`

Methods inherited from class org.jbpm.runtime.manager.impl.DefaultRegisterableItemsFactory
`getAuditBuilder, setAuditBuilder`

Methods inherited from class org.jbpm.runtime.manager.impl.SimpleRegisterableItemsFactory
`addAgendaListener, addProcessListener, addWorkingMemoryListener, addWorkItemHandler, createInstance`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### InjectableRegisterableItemsFactory

    public InjectableRegisterableItemsFactory()

Method Detail

### 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`
  Overrides:
    `getWorkItemHandlers` in class `DefaultRegisterableItemsFactory`
  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.

### getHTWorkItemHandler

    protected WorkItemHandler getHTWorkItemHandler(RuntimeEngine runtime)

  Overrides:
    `getHTWorkItemHandler` in class `DefaultRegisterableItemsFactory`

### 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`
  Overrides:
    `getProcessEventListeners` in class `DefaultRegisterableItemsFactory`
  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.

### getWorkingMemoryEventListeners

    public List<WorkingMemoryEventListener> getWorkingMemoryEventListeners(RuntimeEngine runtime)

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

  Specified by:
    `getWorkingMemoryEventListeners` in interface `RegisterableItemsFactory`
  Overrides:
    `getWorkingMemoryEventListeners` in class `DefaultRegisterableItemsFactory`
  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`
  Overrides:
    `getAgendaEventListeners` in class `DefaultRegisterableItemsFactory`
  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.

### getFactory

    public static RegisterableItemsFactory getFactory(javax.enterprise.inject.spi.BeanManager beanManager,
                                                      AbstractAuditLogger auditlogger)

  Allows to create instance of this class dynamically via `BeanManager`. This is useful in case multiple independent instances are required on runtime and that need cannot be satisfied with regular CDI practices.

  Parameters:
    `beanManager` - - bean manager instance of the container
    `auditlogger` - - `AbstractAuditLogger` logger instance to be used, might be null
  Returns:
    new instance of the factory

### getFactory

    public static RegisterableItemsFactory getFactory(javax.enterprise.inject.spi.BeanManager beanManager,
                                                      AbstractAuditLogger auditlogger,
                                                      KieContainer kieContainer,
                                                      String ksessionName)

  Allows to create instance of this class dynamically via `BeanManager`. This is useful in case multiple independent instances are required on runtime and that need cannot be satisfied with regular CDI practices.

  Parameters:
    `beanManager` - - bean manager instance of the container
    `auditlogger` - - `AbstractAuditLogger` logger instance to be used, might be null
    `kieContainer` - - `KieContainer` that the factory is built for
    `ksessionName` - - name of the ksession defined in kmodule to be used, if not given default ksession from kmodule will be used.
  Returns:

### getInstanceByType

    protected static <T> T getInstanceByType(javax.enterprise.inject.spi.BeanManager manager,
                                             Class<T> type,
                                             Annotation... bindings)

### getAuditlogger

    public AbstractAuditLogger getAuditlogger()

### setAuditlogger

    public void setAuditlogger(AbstractAuditLogger auditlogger)

### getKieContainer

    public KieContainer getKieContainer()

### setKieContainer

    public void setKieContainer(KieContainer kieContainer)

### getKsessionName

    public String getKsessionName()

### setKsessionName

    public void setKsessionName(String ksessionName)

### getParametersMap

    protected Map<String,Object> getParametersMap(RuntimeEngine runtime)

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

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