org.camunda.bpm.application.impl
Class ProcessApplicationReferenceImpl

java.lang.Object
  extended by org.camunda.bpm.application.impl.ProcessApplicationReferenceImpl
All Implemented Interfaces:
ProcessApplicationReference

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.

Author:
Daniel Meyer

Field Summary
protected  String name
           
protected  WeakReference<AbstractProcessApplication> processApplication
          the weak reference to the process application
 
Constructor Summary
ProcessApplicationReferenceImpl(AbstractProcessApplication processApplication)
           
 
Method Summary
 void clear()
           
 String getName()
           
 AbstractProcessApplication getProcessApplication()
          Get the process application.
 void processEngineStopping(ProcessEngine processEngine)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

processApplication

protected WeakReference<AbstractProcessApplication> processApplication
the weak reference to the process application


name

protected String name
Constructor Detail

ProcessApplicationReferenceImpl

public ProcessApplicationReferenceImpl(AbstractProcessApplication processApplication)
Method Detail

getName

public String getName()
Specified by:
getName in interface ProcessApplicationReference
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 interface ProcessApplicationReference
Returns:
the AbstractProcessApplication
Throws:
ProcessApplicationUnavailableException - if the process application is unavailable

processEngineStopping

public void processEngineStopping(ProcessEngine processEngine)
                           throws ProcessApplicationUnavailableException
Throws:
ProcessApplicationUnavailableException

clear

public void clear()


Copyright © 2015 camunda services GmbH. All rights reserved.