Closeable is a resource that can be closed. The close method is invoked to release resources that the
object is holding. The user can pre-register listeners to be notified when resource close is completed (successfully
or otherwise)
| Modifier and Type | Method and Description |
|---|---|
| public void | addCloseFutureListener(SshFutureListener<CloseFuture>
The notification listener)SshFutureListener - never nullPre-register a listener to be informed when resource is closed. |
| public CloseFuture | Returns: aCloseFuture representing the close requesttrue if the resource should be shut down abruptly, false for a
graceful closeClose this resource asynchronously and return a future. |
| public default void | |
| public static void | |
| public static Duration | |
| public boolean | |
| public boolean | |
| public default boolean | |
| public void | removeCloseFutureListener(SshFutureListener<CloseFuture>
The register listener)SshFutureListener - never null. Ignored if not registered or
resource already closedRemove a pre-registered close event listener |
| addCloseFutureListener | back to summary |
|---|---|
| public void addCloseFutureListener(SshFutureListener<CloseFuture> listener) Pre-register a listener to be informed when resource is closed. If resource is already closed, the listener will be invoked immediately and not registered for future notification
| |
| close | back to summary |
|---|---|
| public CloseFuture close(boolean immediately) Close this resource asynchronously and return a future. Resources support two closing modes: a graceful mode which will cleanly close the resource and an immediate mode which will close the resources abruptly.
| |
| close | back to summary |
|---|---|
| public default void close() throws IOException Implements java. Doc from java. Closes this channel. After a channel is closed, any further attempt to invoke I/O
operations upon it will cause a If this channel is already closed then invoking this method has no effect. This method may be invoked at any time. If some other thread has already invoked it, however, then another invocation will block until the first invocation is complete, after which it will return without effect.
| |
| close | back to summary |
|---|---|
| public static void close(Closeable closeable) throws IOException | |
| getMaxCloseWaitTime | back to summary |
|---|---|
| public static Duration getMaxCloseWaitTime(PropertyResolver resolver) | |
| isClosed | back to summary |
|---|---|
| public boolean isClosed() Returns
| |
| isClosing | back to summary |
|---|---|
| public boolean isClosing() Returns
| |
| isOpen | back to summary |
|---|---|
| public default boolean isOpen() Implements java. Doc from java. Tells whether or not this channel is open.
| |
| removeCloseFutureListener | back to summary |
|---|---|
| public void removeCloseFutureListener(SshFutureListener<CloseFuture> listener) Remove a pre-registered close event listener
| |