public interface Closable
Modifier and Type | Interface and Description |
---|---|
static interface |
Closable.CloseAutomaton
The
Closable.CloseAutomaton interface defines those methods related to the
closing of connection(s) life-cycle. |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the component's connection(s).
|
default void |
closeIn(int aCloseInMillis)
Tries to close the component's connection(s) after the given time in
milliseconds.
|
void close() throws CloseException
CloseException
as
upon close we may have to do things like flushing buffers which can fail
(and would otherwise fail unhandled or even worse unnoticed).CloseException
- in case closing or pre-closing (flushing) fails.default void closeIn(int aCloseInMillis)
HiddenException
. Use (if implemented)
ClosedAccessor.isClosed()
to finally determine whether the close
operation succeeded.aCloseInMillis
- The time in milliseconds to pass till
close()
is called.Copyright © 2016. All rights reserved.