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 TypeMethodDescriptionvoid
addCloseFutureListener
(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.boolean
isClosed()
Returnstrue
if this object has been closed.boolean
Returnstrue
if theCloseable.close(boolean)
method has been called.NOTE: the buffer must not be touched until the returned read future is completed.void
Remove 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:Closeable
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.- Specified by:
close
in interfaceCloseable
- Parameters:
immediately
-true
if the resource should be shut down abruptly,false
for a graceful close- Returns:
- a
CloseFuture
representing the close request
-
addCloseFutureListener
Description copied from interface:Closeable
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- Specified by:
addCloseFutureListener
in interfaceCloseable
- Parameters:
listener
- The notificationSshFutureListener
- nevernull
-
removeCloseFutureListener
Description copied from interface:Closeable
Remove a pre-registered close event listener- Specified by:
removeCloseFutureListener
in interfaceCloseable
- Parameters:
listener
- The registerSshFutureListener
- nevernull
. Ignored if not registered or resource already closed
-
isClosed
public boolean isClosed()Description copied from interface:Closeable
Returnstrue
if this object has been closed. -
isClosing
public boolean isClosing()Description copied from interface:Closeable
Returnstrue
if theCloseable.close(boolean)
method has been called. Note that this method will returntrue
even if thisCloseable.isClosed()
returnstrue
. -
read
Description copied from interface:IoInputStream
NOTE: the buffer must not be touched until the returned read future is completed.- Specified by:
read
in interfaceIoInputStream
- Parameters:
buffer
- theBuffer
to use- Returns:
- The
IoReadFuture
for the operation
-