Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM :: Distribution 6.2.0.Final
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jbpm.executor.impl
Class ClassCacheManager

    java.lang.Object
      org.jbpm.executor.impl.ClassCacheManager

    @ApplicationScoped
    public class ClassCacheManager

extends Object

Simple cache to keep classes of commands and callback to not attempt to load them every time.

Constructor Summary
`ClassCacheManager()`

Method Summary
`List<org.kie.internal.executor.api.CommandCallback>` | `buildCommandCallback(org.kie.internal.executor.api.CommandContext ctx, ClassLoader cl)` Builds completely initialized list of callbacks for given context.
`protected void` | `closeInstance(Object instance)`
`void` | `dispose()`
`org.kie.internal.executor.api.Command` | `findCommand(String name, ClassLoader cl)` Finds command by FQCN and if not found loads the class and store the instance in the cache.
`org.kie.internal.executor.api.CommandCallback` | `findCommandCallback(String name, ClassLoader cl)` Finds command callback by FQCN and if not found loads the class and store the instance in the cache.

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

Constructor Detail

### ClassCacheManager

    public ClassCacheManager()

Method Detail

### findCommand

    public org.kie.internal.executor.api.Command findCommand(String name,
                                                             ClassLoader cl)

  Finds command by FQCN and if not found loads the class and store the instance in the cache.

  Parameters:
    `name` - - fully qualified class name of the command
  Returns:
    initialized class instance

### findCommandCallback

    public org.kie.internal.executor.api.CommandCallback findCommandCallback(String name,
                                                                             ClassLoader cl)

  Finds command callback by FQCN and if not found loads the class and store the instance in the cache.

  Parameters:
    `name` - - fully qualified class name of the command callback
  Returns:
    initialized class instance

### buildCommandCallback

    public List<org.kie.internal.executor.api.CommandCallback> buildCommandCallback(org.kie.internal.executor.api.CommandContext ctx,
                                                                                    ClassLoader cl)

  Builds completely initialized list of callbacks for given context.

  Parameters:
    `ctx` - contextual data given by execution service
  Returns:

### closeInstance

    protected void closeInstance(Object instance)

### dispose

    @PreDestroy
    public void dispose()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM :: Distribution 6.2.0.Final
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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