|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.camunda.bpm.application.AbstractProcessApplication
public abstract class AbstractProcessApplication
| Field Summary | |
|---|---|
protected boolean |
isDeployed
|
protected BeanELResolver |
processApplicationBeanElResolver
|
protected ELResolver |
processApplicationElResolver
|
protected ProcessApplicationScriptEnvironment |
processApplicationScriptEnvironment
|
protected VariableSerializers |
variableSerializers
|
| Constructor Summary | |
|---|---|
AbstractProcessApplication()
|
|
| Method Summary | ||
|---|---|---|
protected abstract String |
autodetectProcessApplicationName()
Override this method to autodetect an application name in case the ProcessApplication annotation was used but without parameter. |
|
void |
createDeployment(String processArchiveName,
DeploymentBuilder deploymentBuilder)
Override this method in order to programmatically add resources to the deployment created by this process application. |
|
void |
deploy()
Deploy this process application into the runtime container. |
|
|
execute(Callable<T> callable)
The default implementation simply modifies the Context ClassLoader |
|
|
execute(Callable<T> callable,
InvocationContext invocationContext)
Is invoked instead of ProcessApplicationInterface.execute(Callable) if a context is available. |
|
BeanELResolver |
getBeanElResolver()
Returns an instance of BeanELResolver that a process application caches. |
|
ELResolver |
getElResolver()
This allows the process application to provide a custom ElResolver to the process engine. |
|
Map<String,List<ExecutableScript>> |
getEnvironmentScripts()
see ProcessApplicationScriptEnvironment.getEnvironmentScripts() |
|
ExecutionListener |
getExecutionListener()
Allows the process application to provide an ExecutionListener which is notified about
all execution events in all of the process instances deployed by this process application. |
|
String |
getName()
|
|
ClassLoader |
getProcessApplicationClassloader()
Override this method to provide an environment-specific ClassLoader to be used by the process
engine for loading resources from the process application |
|
protected ProcessApplicationScriptEnvironment |
getProcessApplicationScriptEnvironment()
|
|
Map<String,String> |
getProperties()
override this method in order to provide a map of properties. |
|
ProcessApplicationInterface |
getRawObject()
Since ProcessApplicationInterface.getReference() may return a proxy object, this method returs the actual, unproxied object and is
meant to be called from the ProcessApplicationInterface.execute(Callable) method. |
|
ScriptEngine |
getScriptEngineForName(String name,
boolean cache)
see ProcessApplicationScriptEnvironment.getScriptEngineForName(String, boolean) |
|
TaskListener |
getTaskListener()
Allows the process application to provide a TaskListener which is notified about
all Task events in all of the process instances deployed by this process application. |
|
VariableSerializers |
getVariableSerializers()
|
|
protected ELResolver |
initProcessApplicationElResolver()
Initializes the process application provided ElResolver. |
|
void |
setVariableSerializers(VariableSerializers variableSerializers)
|
|
void |
undeploy()
Undeploy this process application from the runtime container. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.camunda.bpm.application.ProcessApplicationInterface |
|---|
getReference |
| Field Detail |
|---|
protected ELResolver processApplicationElResolver
protected BeanELResolver processApplicationBeanElResolver
protected ProcessApplicationScriptEnvironment processApplicationScriptEnvironment
protected VariableSerializers variableSerializers
protected boolean isDeployed
| Constructor Detail |
|---|
public AbstractProcessApplication()
| Method Detail |
|---|
public void deploy()
ProcessApplicationInterfaceDeploy this process application into the runtime container.
NOTE: on some containers (like JBoss AS 7) the deployment of the process application is performed asynchronously and via introspection at deployment time. This means that there is no guarantee that the process application is fully deployed after this method returns.If you need a post deployment hook, use the @PostDeploy
annotation.
deploy in interface ProcessApplicationInterfacepublic void undeploy()
ProcessApplicationInterfaceUndeploy this process application from the runtime container.
If your application needs to be notified of the undeployment,
add a @PreUndeploy method to your subclass.
undeploy in interface ProcessApplicationInterface
public void createDeployment(String processArchiveName,
DeploymentBuilder deploymentBuilder)
ProcessApplicationInterfaceOverride this method in order to programmatically add resources to the deployment created by this process application.
This method is invoked at deployment time once for each process archive deployed by this process application.
NOTE: this method must NOT call the DeploymentBuilder.deploy()
method.
createDeployment in interface ProcessApplicationInterfaceprocessArchiveName - the name of the processArchive which is currently being deployed.deploymentBuilder - the DeploymentBuilder used to construct the deployment.public String getName()
getName in interface ProcessApplicationInterfaceprotected abstract String autodetectProcessApplicationName()
ProcessApplication annotation was used but without parameter.
public <T> T execute(Callable<T> callable)
throws ProcessApplicationExecutionException
ProcessApplicationInterfaceClassLoader
execute in interface ProcessApplicationInterfacecallable - to be executed "within" the context of this process application.
ProcessApplicationExecutionException
public <T> T execute(Callable<T> callable,
InvocationContext invocationContext)
throws ProcessApplicationExecutionException
ProcessApplicationInterfaceProcessApplicationInterface.execute(Callable) if a context is available.
The default implementation simply forward the call to
ProcessApplicationInterface.execute(Callable). A custom implementation can override the method
to hook into the invocation.
execute in interface ProcessApplicationInterfacecallable - to be executed "within" the context of this process application.invocationContext - of the current invocation, can be null
ProcessApplicationExecutionExceptionpublic ClassLoader getProcessApplicationClassloader()
ProcessApplicationInterfaceOverride this method to provide an environment-specific ClassLoader to be used by the process
engine for loading resources from the process application
NOTE: the process engine must never cache any references to this ClassLoader
or to classes obtained through this ClassLoader.
getProcessApplicationClassloader in interface ProcessApplicationInterfaceClassLoader that can be used to load classes and resources from this process application.public ProcessApplicationInterface getRawObject()
ProcessApplicationInterfaceProcessApplicationInterface.getReference() may return a proxy object, this method returs the actual, unproxied object and is
meant to be called from the ProcessApplicationInterface.execute(Callable) method. (ie. from a Callable implementation passed to
the method.).
getRawObject in interface ProcessApplicationInterfacepublic Map<String,String> getProperties()
ProcessApplicationInterfaceoverride this method in order to provide a map of properties.
The properties are made available globally through the ProcessApplicationService
getProperties in interface ProcessApplicationInterfaceProcessApplicationService,
ProcessApplicationInfo.getProperties()public ELResolver getElResolver()
ProcessApplicationInterfaceThis allows the process application to provide a custom ElResolver to the process engine.
The process engine will use this ElResolver whenever it is executing a process in the context of this process application.
The process engine must only call this method from Callable implementations passed
to ProcessApplicationInterface.execute(Callable)
getElResolver in interface ProcessApplicationInterfacepublic BeanELResolver getBeanElResolver()
ProcessApplicationInterfaceReturns an instance of BeanELResolver that a process application caches.
Has to be managed by the process application since BeanELResolver keeps
hard references to classes in a cache.
getBeanElResolver in interface ProcessApplicationInterfaceprotected ELResolver initProcessApplicationElResolver()
Initializes the process application provided ElResolver. This implementation uses the
Java SE ServiceLoader facilities for resolving implementations of ProcessApplicationElResolver.
If you want to provide a custom implementation in your application, place a file named
META-INF/org.camunda.bpm.application.ProcessApplicationElResolver inside your application
which contains the fully qualified classname of your implementation. Or simply override this method.
public ExecutionListener getExecutionListener()
ProcessApplicationInterfaceAllows the process application to provide an ExecutionListener which is notified about
all execution events in all of the process instances deployed by this process application.
If this method returns 'null', the process application is not notified about execution events.
getExecutionListener in interface ProcessApplicationInterfaceExecutionListener or null.public TaskListener getTaskListener()
ProcessApplicationInterfaceAllows the process application to provide a TaskListener which is notified about
all Task events in all of the process instances deployed by this process application.
If this method returns 'null', the process application is not notified about Task events.
getTaskListener in interface ProcessApplicationInterfaceTaskListener or null.
public ScriptEngine getScriptEngineForName(String name,
boolean cache)
ProcessApplicationScriptEnvironment.getScriptEngineForName(String, boolean)
public Map<String,List<ExecutableScript>> getEnvironmentScripts()
ProcessApplicationScriptEnvironment.getEnvironmentScripts()
protected ProcessApplicationScriptEnvironment getProcessApplicationScriptEnvironment()
public VariableSerializers getVariableSerializers()
public void setVariableSerializers(VariableSerializers variableSerializers)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||