public final class CloseableResourceManager extends Object
Modifier and Type | Method and Description |
---|---|
protected static void |
blockAndReleaseAllCloseableResources()
Blocks any call to register/unregister new resources and releases all resources currently registered.
|
static void |
registerCloseable(Closeable closeable)
Registers the provided closeable.
Will throw an error in case the manager is no longer active (due to JVM shutdown). |
static void |
unregisterCloseable(Closeable closeable)
Unregisters the provided closeable.
Will throw an error in case the manager is no longer active (due to JVM shutdown). |
public static void registerCloseable(Closeable closeable)
closeable
- The closeable to registerpublic static void unregisterCloseable(Closeable closeable)
closeable
- The closeable to unregisterprotected static void blockAndReleaseAllCloseableResources()
Copyright © 2009–2020 fax4j. All rights reserved.