private static enum AbstractClientChannel.NullIoInputStream extends java.lang.Enum<AbstractClientChannel.NullIoInputStream> implements IoInputStream
| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Field and Description |
|---|---|
private CloseFuture |
closing |
| Modifier and Type | Method and Description |
|---|---|
void |
addCloseFutureListener(SshFutureListener<CloseFuture> listener)
Pre-register a listener to be informed when resource is closed.
|
CloseFuture |
close(boolean immediately)
Close this resource asynchronously and return a future.
|
boolean |
isClosed()
Returns
true if this object has been closed. |
boolean |
isClosing()
Returns
true if the Closeable.close(boolean) method has been called. |
IoReadFuture |
read(Buffer buffer)
NOTE: the buffer must not be touched until the returned read future is completed.
|
void |
removeCloseFutureListener(SshFutureListener<CloseFuture> listener)
Remove a pre-registered close event listener
|
static AbstractClientChannel.NullIoInputStream |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static AbstractClientChannel.NullIoInputStream[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfclose, close, getMaxCloseWaitTime, isOpenpublic static final AbstractClientChannel.NullIoInputStream INSTANCE
private final CloseFuture closing
public static AbstractClientChannel.NullIoInputStream[] values()
for (AbstractClientChannel.NullIoInputStream c : AbstractClientChannel.NullIoInputStream.values()) System.out.println(c);
public static AbstractClientChannel.NullIoInputStream valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic CloseFuture close(boolean immediately)
Closeableimmediately - true if the resource should be shut down abruptly, false for a
graceful closeCloseFuture representing the close requestpublic void addCloseFutureListener(SshFutureListener<CloseFuture> listener)
Closeablelistener - The notification SshFutureListener - never nullpublic void removeCloseFutureListener(SshFutureListener<CloseFuture> listener)
Closeablelistener - The register SshFutureListener - never null. Ignored if not registered or
resource already closedpublic boolean isClosed()
Closeabletrue if this object has been closed.true if closingpublic boolean isClosing()
Closeabletrue if the Closeable.close(boolean) method has been called. Note that this method will
return true even if this Closeable.isClosed() returns true.true if closingpublic IoReadFuture read(Buffer buffer)
IoInputStreamread in interface IoInputStreambuffer - the Buffer to useIoReadFuture for the operation