Package ch.njol.util
Interface OpenCloseable
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
BlockingLogHandler,CountingLogHandler,ErrorDescLogHandler,FilteringLogHandler,LogHandler,ParseLogHandler,RedirectingLogHandler,RetainingLogHandler,TestingLogHandler,TimingLogHandler
A object that can both be opened and closed.
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static OpenCloseablecombine(OpenCloseable... openCloseableArray) voidopen()
-
Field Details
-
EMPTY
AnOpenCloseablewithout effect.
-
-
Method Details
-
combine
- Returns:
- a
OpenCloseablethat, when opened, callsopen()on each givenOpenCloseable, in the given order. When closed, callsclose()in each givenOpenCloseablein reverse order.
-
open
void open() -
close
void close()- Specified by:
closein interfaceAutoCloseable
-