public class FinalizerHandler extends java.lang.Object
FinalizerHandlerclass implements the functionality to register
Finalizers and call them at some point in time, such as the end of the current
Finalizers will be called in the reverse sequence
of their registration. That is the last
Finalizer registered will
get called first.
|Constructor and Description|
|Modifier and Type||Method and Description|
Calls all registered
Unregisters all registered
public void registerObject(Finalizer object)
object- the finalzier to register
public void unregister(Finalizer object)
Finalizerobject. After unregistering the objects
doFinalize()method is not called anymore.
Finalizerobject to unregister.
public void unregisterAll()
Finalizerobjects so that a subsequent call to
callFinalizers()effectively does nothing.
public boolean isEmpty()
Finalizerobjects are registered yet.
public void callFinalizers()
Finalizer.doFinalize()method, and removes them from the internal list.
The call to the
Finalizer.doFinalize() is not expected to throw
any exceptions or even errors. In case a
Throwable is thrown
this is logged as an error and processing continiues with the next
Finalizer to be finalized.
Copyright © 2010 - 2020 Adobe. All Rights Reserved