Class PhantomResourceReference
java.lang.Object
java.lang.ref.Reference<T>
java.lang.ref.PhantomReference
de.intarsys.tools.resourcetracker.PhantomResourceReference
- All Implemented Interfaces:
IResourceReference
A generic reference to some trackable resource. The resource finalization is
managed using a
PhantomReference
to the container. When the container
is garbage collected, the reference is forwarded to the
ResourceTracker
that created it for disposal.-
Constructor Summary
ConstructorsConstructorDescriptionPhantomResourceReference
(Object container, Object resource, ResourceTracker tracker) -
Method Summary
Methods inherited from class java.lang.ref.PhantomReference
get
Methods inherited from class java.lang.ref.Reference
clear, clone, enqueue, isEnqueued, reachabilityFence, refersTo
-
Constructor Details
-
PhantomResourceReference
-
-
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.
-