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