Class WeakResourceReference
java.lang.Object
java.lang.ref.Reference<T>
java.lang.ref.WeakReference
de.intarsys.tools.resourcetracker.WeakResourceReference
- All Implemented Interfaces:
IResourceReference
A generic reference to some trackable resource. The resource finalization is
managed using a
WeakReference
to the container. When the container is
garbage collected, the reference is forwarded to the ResourceTracker
that created it for disposal.-
Constructor Summary
ConstructorsConstructorDescriptionWeakResourceReference
(Object container, Object resource, ResourceTracker tracker) -
Method Summary
Methods inherited from class java.lang.ref.Reference
clear, clone, enqueue, get, isEnqueued, reachabilityFence, refersTo
-
Constructor Details
-
WeakResourceReference
-
-
Method Details
-
dispose
public void dispose()- Specified by:
dispose
in interfaceIResourceReference
-
getResource
Description copied from interface:IResourceReference
The resource tracked.- Specified by:
getResource
in interfaceIResourceReference
- Returns:
- The resource tracked.
-