Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM distribution 6.0.0.CR4
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:
  org.kie.internal.runtime.manager.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)`
`AbstractAuditLogger` | `getAuditlogger()`
`static org.kie.internal.runtime.manager.RegisterableItemsFactory` | `getFactory(javax.enterprise.inject.spi.BeanManager beanManager, AbstractAuditLogger auditlogger)` Allows to create instance of this class dynamically via `BeanManager`.
`static org.kie.internal.runtime.manager.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)`
`List<WorkingMemoryEventListener>` | `getWorkingMemoryEventListeners(RuntimeEngine runtime)`
`Map<String,WorkItemHandler>` | `getWorkItemHandlers(RuntimeEngine runtime)`
`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)

  Specified by:
    `getWorkItemHandlers` in interface `org.kie.internal.runtime.manager.RegisterableItemsFactory`
  Overrides:
    `getWorkItemHandlers` in class `DefaultRegisterableItemsFactory`

### getHTWorkItemHandler

    protected WorkItemHandler getHTWorkItemHandler(RuntimeEngine runtime)

  Overrides:
    `getHTWorkItemHandler` in class `DefaultRegisterableItemsFactory`

### getProcessEventListeners

    public List<ProcessEventListener> getProcessEventListeners(RuntimeEngine runtime)

  Specified by:
    `getProcessEventListeners` in interface `org.kie.internal.runtime.manager.RegisterableItemsFactory`
  Overrides:
    `getProcessEventListeners` in class `DefaultRegisterableItemsFactory`

### getWorkingMemoryEventListeners

    public List<WorkingMemoryEventListener> getWorkingMemoryEventListeners(RuntimeEngine runtime)

  Specified by:
    `getWorkingMemoryEventListeners` in interface `org.kie.internal.runtime.manager.RegisterableItemsFactory`
  Overrides:
    `getWorkingMemoryEventListeners` in class `DefaultRegisterableItemsFactory`

### getAgendaEventListeners

    public List<AgendaEventListener> getAgendaEventListeners(RuntimeEngine runtime)

  Specified by:
    `getAgendaEventListeners` in interface `org.kie.internal.runtime.manager.RegisterableItemsFactory`
  Overrides:
    `getAgendaEventListeners` in class `DefaultRegisterableItemsFactory`

### getFactory

    public static org.kie.internal.runtime.manager.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 org.kie.internal.runtime.manager.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.CR4
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.