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
ProcessApplicationReferenceimplementation usingWeakReference.As long as the process application is deployed, the container or the application will hold a strong reference to the
AbstractProcessApplicationobject. This class holds aWeakReference. When the process application is undeployed, the container or application releases all strong references. Since we only passProcessApplicationReferencesto the process engine, it is guaranteed that theAbstractProcessApplicationobject 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.Stringnameprotected java.lang.ref.WeakReference<AbstractProcessApplication>processApplicationthe 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 voidclear()java.lang.StringgetName()AbstractProcessApplicationgetProcessApplication()Get the process application.voidprocessEngineStopping(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:
getNamein interfaceProcessApplicationReference- Returns:
- the name of the process application
-
getProcessApplication
public AbstractProcessApplication getProcessApplication() throws ProcessApplicationUnavailableException
Description copied from interface:ProcessApplicationReferenceGet the process application.- Specified by:
getProcessApplicationin interfaceProcessApplicationReference- Returns:
- the
AbstractProcessApplication - Throws:
ProcessApplicationUnavailableException- if the process application is unavailable
-
processEngineStopping
public void processEngineStopping(ProcessEngine processEngine) throws ProcessApplicationUnavailableException
-
clear
public void clear()
-
-