Package org.apache.sshd.client.channel
Enum AbstractClientChannel.NullIoInputStream
java.lang.Object
java.lang.Enum<AbstractClientChannel.NullIoInputStream>
org.apache.sshd.client.channel.AbstractClientChannel.NullIoInputStream
- All Implemented Interfaces:
Closeable,Serializable,AutoCloseable,Comparable<AbstractClientChannel.NullIoInputStream>,Channel,Closeable,IoInputStream
- Enclosing class:
AbstractClientChannel
private static enum AbstractClientChannel.NullIoInputStream
extends Enum<AbstractClientChannel.NullIoInputStream>
implements IoInputStream
-
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCloseFutureListener(SshFutureListener<CloseFuture> listener) Pre-register a listener to be informed when resource is closed.close(boolean immediately) Close this resource asynchronously and return a future.booleanisClosed()Returnstrueif this object has been closed.booleanReturnstrueif theCloseable.close(boolean)method has been called.NOTE: the buffer must not be touched until the returned read future is completed.voidRemove a pre-registered close event listenerReturns the enum constant of this type with the specified name.values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
Field Details
-
closing
-
-
Constructor Details
-
NullIoInputStream
private NullIoInputStream()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
close
Description copied from interface:CloseableClose 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.- Specified by:
closein interfaceCloseable- Parameters:
immediately-trueif the resource should be shut down abruptly,falsefor a graceful close- Returns:
- a
CloseFuturerepresenting the close request
-
addCloseFutureListener
Description copied from interface:CloseablePre-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- Specified by:
addCloseFutureListenerin interfaceCloseable- Parameters:
listener- The notificationSshFutureListener- nevernull
-
removeCloseFutureListener
Description copied from interface:CloseableRemove a pre-registered close event listener- Specified by:
removeCloseFutureListenerin interfaceCloseable- Parameters:
listener- The registerSshFutureListener- nevernull. Ignored if not registered or resource already closed
-
isClosed
public boolean isClosed()Description copied from interface:CloseableReturnstrueif this object has been closed. -
isClosing
public boolean isClosing()Description copied from interface:CloseableReturnstrueif theCloseable.close(boolean)method has been called. Note that this method will returntrueeven if thisCloseable.isClosed()returnstrue. -
read
Description copied from interface:IoInputStreamNOTE: the buffer must not be touched until the returned read future is completed.- Specified by:
readin interfaceIoInputStream- Parameters:
buffer- theBufferto use- Returns:
- The
IoReadFuturefor the operation
-