Interface GroupCloseable
- All Superinterfaces:
AutoCloseable, Closeable, CloseStateRequestable
- All Known Subinterfaces:
IBackendClient<S>, IBaseEndPoint, IClient, IDataAdapter, IDataAdapter, IDataAdapterAndSchemaReader, IDatabase, IDataReader, IDataWriter, IEndPoint, IEndPoint, IEndPoint, IResettableChangeSaver, IResourcePool<R>, ISchemaAdapter, ISchemaAdapter, ISchemaAdapter, ISchemaReader, ISchemaReader, ISchemaWriter, ISchemaWriter, IServer, IServer, IServer, IServer<S>, ISqlConnection
- All Known Implementing Classes:
AbstractBackendClient, AbstractBaseEndPoint, AbstractClient, AbstractDataAdapter, AbstractDataAdapter, AbstractDataAdapterAndSchemaReader, AbstractEndPoint, AbstractEndPoint, AbstractEndPoint, AbstractFrontendClient, AbstractNetEndPoint, AbstractResourcePool, AbstractSchemaAdapter, AbstractSchemaAdapter, AbstractServer, AbstractServer, AbstractServer, AbstractServer, AbstractSqlConnection, AbstractSqlDataAdapter, AbstractWebClient, AbstractWrapperResource, Database, DataReader, DataReader, DataWriter, DataWriter, LocalEndPoint, LocalEndPoint, LocalEndPoint, LocalServer, LocalServer, LocalServer, LocalServer, MsSqlConnection, MsSqlDataAdapter, MsSqlDataAdapter, MsSqlDataAdapterAndSchemaReader, MsSqlSchemaAdapter, NetEndPoint, NetEndPoint, NodeDataAdapter, NodeDataAdapter, NodeDataAdapterAndSchemaReader, NodeSchemaAdapter, NodeSchemaAdapter, SchemaReader, SchemaReader, SchemaReader, SchemaWriter, SchemaWriter, SchemaWriter, Server, Server, Server, Server, SocketEndPoint, SqlConnectionPool, SqlSchemaAdapter, SqlSchemaAdapter, SslServer, SslServer, SslServer, SslServer, SslServerEndPoint, UncloseableSqlConnection, WebClient, WrapperSqlConnection
- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()Closes the currentCloseable.default voidcreateCloseDependencyTo(GroupCloseable element) Creates a close dependency between the currentGroupCloseableand the given element.default booleanisClosed()voidLets the currentGroupCloseablenote a close.Methods inherited from interface CloseStateRequestable
isOpen
-
Method Details
-
close
default void close()Closes the currentCloseable.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
createCloseDependencyTo
Creates a close dependency between the currentGroupCloseableand the given element. When aGroupCloseableis closed, all elements, the currentGroupCloseablehas a close dependency to, will be closed too and vice versa.- Parameters:
element-- Throws:
RuntimeException- if the currentGroupCloseableis already closed.RuntimeException- if the currentGroupCloseablehas already a close dependency to the given element.
-
getStoredCloseController
ICloseController getStoredCloseController()- Returns:
- the
ICloseControllerof the currentGroupCloseable.
-
isClosed
default boolean isClosed()- Specified by:
isClosedin interfaceCloseStateRequestable- Returns:
- true if the current
CloseStateRequestableis closed, false otherwise.
-
noteClose
void noteClose()Lets the currentGroupCloseablenote a close.
-