public class ProcessApplicationReferenceImpl extends Object implements ProcessApplicationReference
A ProcessApplicationReference implementation using
WeakReference.
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 a WeakReference. When the process
application is undeployed, the container or application releases all strong
references. Since we only pass ProcessApplicationReferences to the process engine, it is guaranteed that
the AbstractProcessApplication object can be reclaimed by the garbage
collector, even if the undeployment and unregistration should fail for some
improbable reason.
| Modifier and Type | Field and Description |
|---|---|
protected String |
name |
protected WeakReference<AbstractProcessApplication> |
processApplication
the weak reference to the process application
|
| Constructor and Description |
|---|
ProcessApplicationReferenceImpl(AbstractProcessApplication processApplication) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
String |
getName() |
AbstractProcessApplication |
getProcessApplication()
Get the process application.
|
void |
processEngineStopping(ProcessEngine processEngine) |
protected WeakReference<AbstractProcessApplication> processApplication
protected String name
public ProcessApplicationReferenceImpl(AbstractProcessApplication processApplication)
public String getName()
getName in interface ProcessApplicationReferencepublic AbstractProcessApplication getProcessApplication() throws ProcessApplicationUnavailableException
ProcessApplicationReferencegetProcessApplication in interface ProcessApplicationReferenceAbstractProcessApplicationProcessApplicationUnavailableException - if the process application is unavailablepublic void processEngineStopping(ProcessEngine processEngine) throws ProcessApplicationUnavailableException
public void clear()
Copyright © 2018. All rights reserved.