public interface CloseableModule extends CloseableSupport, SingletonScopeSupport
Modifier and Type | Method and Description |
---|---|
default void |
close()
Tries to close all registered objects, but will abort at the first
failure with the exception thrown from closeable.
|
default <T extends AutoCloseable> |
closeWithModule(T closeable)
Applied directly to closeable objects will register
the object to be closed together with the module.
|
default Collection<AutoCloseable> |
getCloseables() |
getSingletonScope, singleton, singletonSupplier
default Collection<AutoCloseable> getCloseables()
default <T extends AutoCloseable> T closeWithModule(T closeable)
CloseableSupport
closeWithModule
in interface CloseableSupport
default void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 2016. All rights reserved.