public class CloseableRegistry extends Object implements Closeable
Closeable instances.| Constructor and Description |
|---|
CloseableRegistry() |
public void register(Closeable closeable)
Closeable instance with the receiver. An
instance (dependent) that depends upon another instance
(parent) must be registered after the parent.closeable - The closeable.public void close()
Closeable instances registered with the
receiver. All instances are always closed, even if an
error occurs while closing an instance; such errors are merely
logged, but do not prevent further closures. The order of
closures is the reverse of the registration order.close in interface Closeableclose in interface AutoCloseableCopyright © 2015. All Rights Reserved.