Package org.camunda.bpm.application.impl
Class ProcessApplicationReferenceImpl
- java.lang.Object
-
- org.camunda.bpm.application.impl.ProcessApplicationReferenceImpl
-
- All Implemented Interfaces:
ProcessApplicationReference
public class ProcessApplicationReferenceImpl extends java.lang.Object implements ProcessApplicationReference
A
ProcessApplicationReference
implementation usingWeakReference
.As long as the process application is deployed, the container or the application will hold a strong reference to the
AbstractProcessApplication
object. This class holds aWeakReference
. When the process application is undeployed, the container or application releases all strong references. Since we only passProcessApplicationReferences
to the process engine, it is guaranteed that theAbstractProcessApplication
object can be reclaimed by the garbage collector, even if the undeployment and unregistration should fail for some improbable reason.- Author:
- Daniel Meyer
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
name
protected java.lang.ref.WeakReference<AbstractProcessApplication>
processApplication
the weak reference to the process application
-
Constructor Summary
Constructors Constructor Description ProcessApplicationReferenceImpl(AbstractProcessApplication processApplication)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
java.lang.String
getName()
AbstractProcessApplication
getProcessApplication()
Get the process application.void
processEngineStopping(ProcessEngine processEngine)
-
-
-
Field Detail
-
processApplication
protected java.lang.ref.WeakReference<AbstractProcessApplication> processApplication
the weak reference to the process application
-
name
protected java.lang.String name
-
-
Constructor Detail
-
ProcessApplicationReferenceImpl
public ProcessApplicationReferenceImpl(AbstractProcessApplication processApplication)
-
-
Method Detail
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceProcessApplicationReference
- Returns:
- the name of the process application
-
getProcessApplication
public AbstractProcessApplication getProcessApplication() throws ProcessApplicationUnavailableException
Description copied from interface:ProcessApplicationReference
Get the process application.- Specified by:
getProcessApplication
in interfaceProcessApplicationReference
- Returns:
- the
AbstractProcessApplication
- Throws:
ProcessApplicationUnavailableException
- if the process application is unavailable
-
processEngineStopping
public void processEngineStopping(ProcessEngine processEngine) throws ProcessApplicationUnavailableException
-
clear
public void clear()
-
-