Class ResourceCleaner

java.lang.Object
org.jboss.resteasy.spi.ResourceCleaner

public class ResourceCleaner extends Object
A utility used to register resources to be cleaned with a Cleaner.
Author:
James R. Perkins
  • Method Details

    • 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 monitor
      action - the action to run for the clean up
      Returns:
      a cleanable instance
      See Also: