Package org.jboss.resteasy.core
Class ResourceCleaner
- java.lang.Object
-
- org.jboss.resteasy.core.ResourceCleaner
-
public class ResourceCleaner extends Object
A utility used to register resources to be cleaned with aCleaner
.- Author:
- James R. Perkins
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Cleaner.Cleanable
register(Object instance, Runnable action)
Register an object and an action to clean up resources associated with the object once the object instance becomes phantom unreachable.
-
-
-
Method Detail
-
register
public static Cleaner.Cleanable register(Object instance, Runnable action)
Register an object and an action to clean up resources associated with the object once the object instance becomes phantom unreachable.- Parameters:
instance
- the instance to monitoraction
- the action to run for the clean up- Returns:
- a cleanable instance
- See Also:
Cleaner
-
-