Top Description Inners Fields Constructors Methods
org.apache.sshd.client.channel

public abstract Class AbstractClientChannel

extends AbstractChannel
implements ClientChannel
Class Inheritance
All Implemented Interfaces
org.apache.sshd.client.channel.ClientChannel, org.apache.sshd.client.session.ClientSessionHolder, org.apache.sshd.common.channel.StreamingChannel, org.apache.sshd.common.channel.Channel, org.apache.sshd.common.Closeable, java.nio.channels.Channel, java.io.Closeable, java.lang.AutoCloseable, org.apache.sshd.common.channel.throttle.ChannelStreamWriterResolverManager, org.apache.sshd.common.channel.throttle.ChannelStreamWriterResolver, org.apache.sshd.common.AttributeStore, org.apache.sshd.common.AttributeRepository, org.apache.sshd.common.PropertyResolver, org.apache.sshd.common.channel.ChannelListenerManager, org.apache.sshd.common.channel.ChannelIdentifier, org.apache.sshd.common.session.SessionHolder, org.apache.sshd.common.session.SessionContextHolder
Known Direct Subclasses
org.apache.sshd.client.channel.AsyncCapableClientChannel, org.apache.sshd.common.forward.TcpipClientChannel, org.apache.sshd.server.x11.ChannelForwardedX11, org.apache.sshd.agent.local.AgentForwardedChannel, org.apache.sshd.agent.unix.AgentForwardedChannel
Imports
java.io.EOFException, .IOException, .InputStream, .OutputStream, java.util.Collection, .Collections, .EnumSet, .Objects, .Set, java.util.concurrent.TimeUnit, java.util.concurrent.atomic.AtomicBoolean, .AtomicReference, org.apache.sshd.client.channel.exit.ExitSignalChannelRequestHandler, .ExitStatusChannelRequestHandler, org.apache.sshd.client.future.DefaultOpenFuture, .OpenFuture, org.apache.sshd.common.Closeable, .FactoryManager, .SshConstants, .SshException, org.apache.sshd.common.channel.AbstractChannel, .Channel, .ChannelAsyncInputStream, .ChannelAsyncOutputStream, .LocalWindow, .RemoteWindow, .RequestHandler, org.apache.sshd.common.channel.exception.SshChannelOpenException, org.apache.sshd.common.future.CloseFuture, .DefaultCloseFuture, .SshFutureListener, org.apache.sshd.common.io.IoInputStream, .IoOutputStream, .IoReadFuture, org.apache.sshd.common.session.Session, org.apache.sshd.common.util.EventNotifier, .ExceptionUtils, .ValidateUtils, org.apache.sshd.common.util.buffer.Buffer, .ByteArrayBuffer, org.apache.sshd.common.util.io.IoUtils

TODO Add javadoc
Author
Apache MINA SSHD Project

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static enum

Field Summary

Modifier and TypeField and Description
protected ChannelAsyncInputStream
protected ChannelAsyncOutputStream
protected ChannelAsyncInputStream
private final String
protected OutputStream
protected final AtomicReference<String>
protected final AtomicReference<Integer>
protected InputStream
protected InputStream
protected OutputStream
protected InputStream
private static final InputStream
protected final AtomicBoolean
protected String
protected String
protected int
protected OpenFuture
protected OutputStream
protected boolean
protected StreamingChannel.Streaming
Inherited from org.apache.sshd.common.channel.AbstractChannel:
channelListenerProxychannelListenerscloseSignaledDEFAULT_PACKET_VALIDATOReofReceivedeofSentgracefulFuturegracefulStateinitializedRESPONSE_BUFFER_GROWTH_FACTORserviceunregisterSignaled

Constructor Summary

AccessConstructor and Description
protected
protected

Method Summary

Modifier and TypeMethod and Description
protected void
protected abstract void
protected void
doWriteData(byte[] data, int off, long len)

Implements abstract org.apache.sshd.common.channel.AbstractChannel.doWriteData.

protected void
public IoInputStream
public IoOutputStream
public IoInputStream
public Set<ClientChannelEvent>
public String
public OutputStream
public String
public Integer
public InputStream
protected Closeable
public InputStream
public OutputStream
getInvertedIn()

Implements org.apache.sshd.client.channel.ClientChannel.getInvertedIn.

Obtains an OutputStream to send data directly to the remote end of the channel.

public InputStream
public OutputStream
public StreamingChannel.Streaming
public void
handleOpenFailure(Buffer
Incoming Buffer that triggered the call

Note

the buffer's read position is exactly after the information that read to this call was decoded

buffer
)

Implements org.apache.sshd.common.channel.Channel.handleOpenFailure.

For a client channel, this method will be called internally by the session when the server has rejected this channel opening.

public void
handleOpenSuccess(long
Recipient identifier (UINT32 represented as a long)
recipient
,
long
Read/Write window size (uint32)
rwSize
,
long
Preferred maximum packet size (uint32)
packetSize
,
Buffer
Incoming Buffer that triggered the call

Note

the buffer's read position is exactly after the information that read to this call was decoded

buffer
)

Implements org.apache.sshd.common.channel.Channel.handleOpenSuccess.

For a client channel, this method will be called internally by the session when the confirmation has been received.

public void
handleWindowAdjust(Buffer
The rest of the message data Buffer after decoding the channel identifiers
buffer
)

Overrides org.apache.sshd.common.channel.AbstractChannel.handleWindowAdjust.

Implements org.apache.sshd.common.channel.Channel.handleWindowAdjust.

Invoked when SSH_MSG_CHANNEL_WINDOW_ADJUST received

public boolean
protected boolean
public synchronized OpenFuture
public OpenFuture
open(long
Recipient identifier (UINT32 represented as a long)
recipient
,
long
Read/Write window size (uint32)
rwSize
,
long
Preferred maximum packet size (uint32)
packetSize
,
Buffer
Incoming Buffer that triggered the call

Note

the buffer's read position is exactly after the information that read to this call was decoded

buffer
)

Implements org.apache.sshd.common.channel.Channel.open.

For a server channel, this method will actually open the channel

public void
setErr(OutputStream err)

Implements org.apache.sshd.client.channel.ClientChannel.setErr.

Sets an output stream for the channel to write received SshConstants#SSH_MSG_CHANNEL_EXTENDED_DATA data to.

public void
setIn(InputStream
an InputStream to be polled and forwarded
in
)

Implements org.apache.sshd.client.channel.ClientChannel.setIn.

Sets an InputStream that will be read by this channel and forwarded to the remote channel.

public void
setOut(OutputStream out)

Implements org.apache.sshd.client.channel.ClientChannel.setOut.

Sets an output stream for the channel to write received SshConstants#SSH_MSG_CHANNEL_DATA data to.

public void
setRedirectErrorStream(boolean
whether to redirect the error stream to the output stream.
redirectErrorStream
)

Implements org.apache.sshd.client.channel.ClientChannel.setRedirectErrorStream.

Defines whether to redirect the error stream into the output stream; has no effect if setErr(OutputStream) has also been called by the time the channel is opened.

public void
protected <C extends Collection<ClientChannelEvent>> C
public Set<ClientChannelEvent>
waitFor(Collection<ClientChannelEvent> mask, long
The timeout to wait (msec.) - if non-positive then forever
timeout
)

Implements org.apache.sshd.client.channel.ClientChannel.waitFor.

Waits until any of the specified events in the mask is signaled

Inherited from org.apache.sshd.common.channel.AbstractChannel:
addChannelListeneraddPendingRequestaddRequestHandlerattributeKeysclearAttributescomputeAttributeIfAbsentconfigureWindowgetAttributegetAttributesCountgetChannelIdgetChannelListenerProxygetChannelStreamWriterResolvergetExecutorServicegetLocalWindowgetPacketValidatorgetParentPropertyResolvergetPropertiesgetRecipientgetRemoteWindowgetRequestHandlersgetSessionhandleChannelRegistrationResulthandleChannelRequesthandleChannelUnregistrationhandleClosehandleDatahandleEofhandleExtendedDatahandleFailurehandleInternalRequesthandleRequesthandleSuccesshandleUnknownChannelRequestinitinvokeChannelSignallerisEofSentisEofSignalledisInitializednotifyStateChangednotifyStateChangedpreCloseremoveAttributeremoveChannelListenerremovePendingRequestremoveRequestHandlerresolveChannelStreamWriterResolversendEofsendResponsesendWindowAdjustsetAttributesetChannelStreamWriterResolversetPacketValidatorsetRecipientsignalChannelClosedsignalChannelClosedsignalChannelInitializedsignalChannelInitializedsignalChannelOpenFailuresignalChannelOpenFailuresignalChannelOpenSuccesssignalChannelOpenSuccesstoStringvalidateIncomingDataSizewritePacket

Field Detail

asyncErrback to summary
protected ChannelAsyncInputStream asyncErr
asyncInback to summary
protected ChannelAsyncOutputStream asyncIn
asyncOutback to summary
protected ChannelAsyncInputStream asyncOut
channelTypeback to summary
private final String channelType
errback to summary
protected OutputStream err
exitSignalHolderback to summary
protected final AtomicReference<String> exitSignalHolder
exitStatusHolderback to summary
protected final AtomicReference<Integer> exitStatusHolder
inback to summary
protected InputStream in
invertedErrback to summary
protected InputStream invertedErr
invertedInback to summary
protected OutputStream invertedIn
invertedOutback to summary
protected InputStream invertedOut
NULL_INPUT_STREAMback to summary
private static final InputStream NULL_INPUT_STREAM
openedback to summary
protected final AtomicBoolean opened
openFailureLangback to summary
protected String openFailureLang
openFailureMsgback to summary
protected String openFailureMsg
openFailureReasonback to summary
protected int openFailureReason
openFutureback to summary
protected OpenFuture openFuture
outback to summary
protected OutputStream out
redirectErrorStreamback to summary
protected boolean redirectErrorStream
streamingback to summary
protected StreamingChannel.Streaming streaming

Constructor Detail

AbstractClientChannelback to summary
protected AbstractClientChannel(String type)
AbstractClientChannelback to summary
protected AbstractClientChannel(String type, Collection<? extends RequestHandler<Channel>> handlers)

Method Detail

addChannelSignalRequestHandlersback to summary
protected void addChannelSignalRequestHandlers(EventNotifier<String> notifier)
doOpenback to summary
protected abstract void doOpen() throws IOException
doWriteDataback to summary
protected void doWriteData(byte[] data, int off, long len) throws IOException

Implements abstract org.apache.sshd.common.channel.AbstractChannel.doWriteData.

Annotations
@Override
doWriteExtendedDataback to summary
protected void doWriteExtendedData(byte[] data, int off, long len) throws IOException

Implements abstract org.apache.sshd.common.channel.AbstractChannel.doWriteExtendedData.

Annotations
@Override
getAsyncErrback to summary
public IoInputStream getAsyncErr()

Implements org.apache.sshd.client.channel.ClientChannel.getAsyncErr.

Annotations
@Override
getAsyncInback to summary
public IoOutputStream getAsyncIn()

Implements org.apache.sshd.client.channel.ClientChannel.getAsyncIn.

Annotations
@Override
getAsyncOutback to summary
public IoInputStream getAsyncOut()

Implements org.apache.sshd.client.channel.ClientChannel.getAsyncOut.

Annotations
@Override
getChannelStateback to summary
public Set<ClientChannelEvent> getChannelState()

Implements org.apache.sshd.client.channel.ClientChannel.getChannelState.

Returns:Set<ClientChannelEvent>

Doc from org.apache.sshd.client.channel.ClientChannel.getChannelState.

A snapshot of the current channel state

Annotations
@Override
getChannelTypeback to summary
public String getChannelType()

Implements org.apache.sshd.client.channel.ClientChannel.getChannelType.

Returns:String

Doc from org.apache.sshd.client.channel.ClientChannel.getChannelType.

The type of channel reported when it was created

Annotations
@Override
getErrback to summary
public OutputStream getErr()
getExitSignalback to summary
public String getExitSignal()

Implements org.apache.sshd.client.channel.ClientChannel.getExitSignal.

Returns:String

Doc from org.apache.sshd.client.channel.ClientChannel.getExitSignal.

The signaled exit signal via "exit-signal" - null if not signaled

Annotations
@Override
getExitStatusback to summary
public Integer getExitStatus()

Implements org.apache.sshd.client.channel.ClientChannel.getExitStatus.

Returns:Integer

Doc from org.apache.sshd.client.channel.ClientChannel.getExitStatus.

The signaled exit status via "exit-status" request - null if not signaled

Annotations
@Override
getInback to summary
public InputStream getIn()
getInnerCloseableback to summary
protected Closeable getInnerCloseable()

Overrides org.apache.sshd.common.channel.AbstractChannel.getInnerCloseable.

Annotations
@Override
getInvertedErrback to summary
public InputStream getInvertedErr()

Implements org.apache.sshd.client.channel.ClientChannel.getInvertedErr.

Doc from org.apache.sshd.client.channel.ClientChannel.getInvertedErr.

Obtains an InputStream to read received SshConstants#SSH_MSG_CHANNEL_EXTENDED_DATA data directly from the channel. This is an alternative to setErr(OutputStream). If the error stream is redirected to the output stream via setRedirectErrorStream(true), the returned stream will not receive any data and be always at EOF.

When the channel closes, it will not close the returned stream. It is the caller's responsibility to close the returned stream if needed. Closing the stream while the channel is open may cause the channel to be closed forcibly if more data arrives. The stream remains open after the channel has closed, so that the caller can read the last arrived data even afterwards.

As with all external processes, the application should read this stream (unless it was redirected) to avoid that the channel blocks when the stream's buffer is full. The buffer size for the returned stream is bounded by the channel's local window size. If the caller does not read this stream, the channel will block once the local window is exhausted.

This method should be called only after the channel has been opened.

Returns:InputStream

an InputStream for reading received data, or null if an output stream was set via setErr(OutputStream)

Annotations
@Override
getInvertedInback to summary
public OutputStream getInvertedIn()

Implements org.apache.sshd.client.channel.ClientChannel.getInvertedIn.

Doc from org.apache.sshd.client.channel.ClientChannel.getInvertedIn.

Obtains an OutputStream to send data directly to the remote end of the channel. This can be used instead of using setIn(InputStream) method and having the channel polling for data in that stream.

When the channel closes, it will close the returned stream.

This method should be called only after the channel has been opened.

Returns:OutputStream

an OutputStream for sending data, or null if an input stream was set via setIn(InputStream)

Annotations
@Override
getInvertedOutback to summary
public InputStream getInvertedOut()

Implements org.apache.sshd.client.channel.ClientChannel.getInvertedOut.

Doc from org.apache.sshd.client.channel.ClientChannel.getInvertedOut.

Obtains an InputStream to read received SshConstants#SSH_MSG_CHANNEL_DATA data directly from the channel. This is an alternative to setOut(OutputStream). If the error stream is redirected to the output stream via setRedirectErrorStream(true), this stream will also receive SshConstants#SSH_MSG_CHANNEL_EXTENDED_DATA data.

When the channel closes, it will not close the returned stream. It is the caller's responsibility to close the returned stream if needed. Closing the stream while the channel is open may cause the channel to be closed forcibly if more data arrives. The stream remains open after the channel has closed, so that the caller can read the last arrived data even afterwards.

As with all external processes, the application should read this stream to avoid that the channel blocks when the stream's buffer is full. The buffer size for the returned stream is bounded by the channel's local window size. If the caller does not read this stream, the channel will block once the local window is exhausted.

This method should be called only after the channel has been opened.

Returns:InputStream

an InputStream for reading received data, or null if an output stream was set via setOut(OutputStream)

Annotations
@Override
getOutback to summary
public OutputStream getOut()
getStreamingback to summary
public StreamingChannel.Streaming getStreaming()

Implements org.apache.sshd.common.channel.StreamingChannel.getStreaming.

Annotations
@Override
handleOpenFailureback to summary
public void handleOpenFailure(Buffer buffer)

Implements org.apache.sshd.common.channel.Channel.handleOpenFailure.

Doc from org.apache.sshd.common.channel.Channel.handleOpenFailure.

For a client channel, this method will be called internally by the session when the server has rejected this channel opening.

Parameters
buffer:Buffer

Incoming Buffer that triggered the call

Note

the buffer's read position is exactly after the information that read to this call was decoded

Annotations
@Override
handleOpenSuccessback to summary
public void handleOpenSuccess(long recipient, long rwSize, long packetSize, Buffer buffer)

Implements org.apache.sshd.common.channel.Channel.handleOpenSuccess.

Doc from org.apache.sshd.common.channel.Channel.handleOpenSuccess.

For a client channel, this method will be called internally by the session when the confirmation has been received.

Parameters
recipient:long

Recipient identifier (UINT32 represented as a long)

rwSize:long

Read/Write window size (uint32)

packetSize:long

Preferred maximum packet size (uint32)

buffer:Buffer

Incoming Buffer that triggered the call

Note

the buffer's read position is exactly after the information that read to this call was decoded

Annotations
@Override
handleWindowAdjustback to summary
public void handleWindowAdjust(Buffer buffer) throws IOException

Overrides org.apache.sshd.common.channel.AbstractChannel.handleWindowAdjust.

Implements org.apache.sshd.common.channel.Channel.handleWindowAdjust.

Doc from org.apache.sshd.common.channel.Channel.handleWindowAdjust.

Invoked when SSH_MSG_CHANNEL_WINDOW_ADJUST received

Parameters
buffer:Buffer

The rest of the message data Buffer after decoding the channel identifiers

Annotations
@Override
Exceptions
IOException:
If failed to handle the message
isRedirectErrorStreamback to summary
public boolean isRedirectErrorStream()
mayWriteback to summary
protected boolean mayWrite()

Overrides org.apache.sshd.common.channel.AbstractChannel.mayWrite.

Annotations
@Override
openback to summary
public synchronized OpenFuture open() throws IOException

Implements org.apache.sshd.client.channel.ClientChannel.open.

Annotations
@Override
openback to summary
public OpenFuture open(long recipient, long rwSize, long packetSize, Buffer buffer)

Implements org.apache.sshd.common.channel.Channel.open.

Doc from org.apache.sshd.common.channel.Channel.open.

For a server channel, this method will actually open the channel

Parameters
recipient:long

Recipient identifier (UINT32 represented as a long)

rwSize:long

Read/Write window size (uint32)

packetSize:long

Preferred maximum packet size (uint32)

buffer:Buffer

Incoming Buffer that triggered the call

Note

the buffer's read position is exactly after the information that read to this call was decoded

Returns:OpenFuture

An OpenFuture for the channel open request

Annotations
@Override
setErrback to summary
public void setErr(OutputStream err)

Implements org.apache.sshd.client.channel.ClientChannel.setErr.

Doc from org.apache.sshd.client.channel.ClientChannel.setErr.

Sets an output stream for the channel to write received SshConstants#SSH_MSG_CHANNEL_EXTENDED_DATA data to. For remote command execution, this is typically the remote command's stderr.

The stream must be set before the channel is opened. When the channel closes, it will close the given stream.

If no stream is set by the time the channel is opened, the channel will internally forward data to a stream that can be read via the InputStream obtained via getInvertedErr(). (Or it might forward the data to the output stream if setRedirectErrorStream(true) is set.)

Parameters
err:OutputStream

the OutputStream

Annotations
@Override
setInback to summary
public void setIn(InputStream in)

Implements org.apache.sshd.client.channel.ClientChannel.setIn.

Doc from org.apache.sshd.client.channel.ClientChannel.setIn.

Sets an InputStream that will be read by this channel and forwarded to the remote channel. Note that using such a stream will create an additional thread for pumping the stream which will only be able to end when that stream is actually closed or EOF on the stream is reached. It is recommended to use the getInvertedIn() method instead and write data directly.

The stream must be set before the channel is opened. When the channel closes, it will close the given stream. If the stream should not be closed (for instance, if it is System.in), wrap it in an NoCloseInputStream.

Parameters
in:InputStream

an InputStream to be polled and forwarded

Annotations
@Override
setOutback to summary
public void setOut(OutputStream out)

Implements org.apache.sshd.client.channel.ClientChannel.setOut.

Doc from org.apache.sshd.client.channel.ClientChannel.setOut.

Sets an output stream for the channel to write received SshConstants#SSH_MSG_CHANNEL_DATA data to. For remote command execution, this is typically the remote command's stdout. If the error stream is redirected to the output stream via setRedirectErrorStream(true), this stream will also receive SshConstants#SSH_MSG_CHANNEL_EXTENDED_DATA data.

The stream must be set before the channel is opened. When the channel closes, it will close the given stream.

If no stream is set by the time the channel is opened, the channel will internally forward data to a stream that can be read via the InputStream obtained via getInvertedOut().

Parameters
out:OutputStream

the OutputStream

Annotations
@Override
setRedirectErrorStreamback to summary
public void setRedirectErrorStream(boolean redirectErrorStream)

Implements org.apache.sshd.client.channel.ClientChannel.setRedirectErrorStream.

Doc from org.apache.sshd.client.channel.ClientChannel.setRedirectErrorStream.

Defines whether to redirect the error stream into the output stream; has no effect if setErr(OutputStream) has also been called by the time the channel is opened.

Parameters
redirectErrorStream:boolean

whether to redirect the error stream to the output stream.

Annotations
@Override
setStreamingback to summary
public void setStreaming(StreamingChannel.Streaming streaming)

Implements org.apache.sshd.common.channel.StreamingChannel.setStreaming.

Annotations
@Override
updateCurrentChannelStateback to summary
protected <C extends Collection<ClientChannelEvent>> C updateCurrentChannelState(C state)
waitForback to summary
public Set<ClientChannelEvent> waitFor(Collection<ClientChannelEvent> mask, long timeout)

Implements org.apache.sshd.client.channel.ClientChannel.waitFor.

Doc from org.apache.sshd.client.channel.ClientChannel.waitFor.

Waits until any of the specified events in the mask is signaled

Parameters
mask:Collection<ClientChannelEvent>

The ClientChannelEvents mask

timeout:long

The timeout to wait (msec.) - if non-positive then forever

Returns:Set<ClientChannelEvent>

The actual signaled event - includes ClientChannelEvent#TIMEOUT if timeout expired before the expected event was signaled

Annotations
@Override
org.apache.sshd.client.channel back to summary

private final Enum AbstractClientChannel.NullIoInputStream

extends Enum<AbstractClientChannel.NullIoInputStream>
implements IoInputStream
Class Inheritance
All Implemented Interfaces
org.apache.sshd.common.io.IoInputStream, org.apache.sshd.common.Closeable, java.nio.channels.Channel, java.io.Closeable, java.lang.AutoCloseable

Field Summary

Modifier and TypeField and Description
private final CloseFuture
public static final AbstractClientChannel.NullIoInputStream

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
addCloseFutureListener(SshFutureListener<CloseFuture>
The notification SshFutureListener - never null
listener
)

Implements org.apache.sshd.common.Closeable.addCloseFutureListener.

Pre-register a listener to be informed when resource is closed.

public CloseFuture
close(boolean
true if the resource should be shut down abruptly, false for a graceful close
immediately
)

Implements org.apache.sshd.common.Closeable.close.

Close this resource asynchronously and return a future.

public boolean
isClosed()

Implements org.apache.sshd.common.Closeable.isClosed.

Returns true if this object has been closed.

public boolean
isClosing()

Implements org.apache.sshd.common.Closeable.isClosing.

Returns true if the close(boolean) method has been called.

public IoReadFuture
read(Buffer
the Buffer to use
buffer
)

Implements org.apache.sshd.common.io.IoInputStream.read.

Note

the buffer must not be touched until the returned read future is completed.

public void
removeCloseFutureListener(SshFutureListener<CloseFuture>
The register SshFutureListener - never null. Ignored if not registered or resource already closed
listener
)

Implements org.apache.sshd.common.Closeable.removeCloseFutureListener.

Remove a pre-registered close event listener

public static AbstractClientChannel.NullIoInputStream
public static AbstractClientChannel.NullIoInputStream[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

closingback to summary
private final CloseFuture closing
INSTANCEback to summary
public static final AbstractClientChannel.NullIoInputStream INSTANCE

Constructor Detail

NullIoInputStreamback to summary
private NullIoInputStream()

Method Detail

addCloseFutureListenerback to summary
public void addCloseFutureListener(SshFutureListener<CloseFuture> listener)

Implements org.apache.sshd.common.Closeable.addCloseFutureListener.

Doc from org.apache.sshd.common.Closeable.addCloseFutureListener.

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

Parameters
listener:SshFutureListener<CloseFuture>

The notification SshFutureListener - never null

Annotations
@Override
closeback to summary
public CloseFuture close(boolean immediately)

Implements org.apache.sshd.common.Closeable.close.

Doc from org.apache.sshd.common.Closeable.close.

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.

Parameters
immediately:boolean

true if the resource should be shut down abruptly, false for a graceful close

Returns:CloseFuture

a CloseFuture representing the close request

Annotations
@Override
isClosedback to summary
public boolean isClosed()

Implements org.apache.sshd.common.Closeable.isClosed.

Doc from org.apache.sshd.common.Closeable.isClosed.

Returns true if this object has been closed.

Returns:boolean

true if closing

Annotations
@Override
isClosingback to summary
public boolean isClosing()

Implements org.apache.sshd.common.Closeable.isClosing.

Doc from org.apache.sshd.common.Closeable.isClosing.

Returns true if the close(boolean) method has been called. Note that this method will return true even if this isClosed() returns true.

Returns:boolean

true if closing

Annotations
@Override
readback to summary
public IoReadFuture read(Buffer buffer)

Implements org.apache.sshd.common.io.IoInputStream.read.

Doc from org.apache.sshd.common.io.IoInputStream.read.

Note

the buffer must not be touched until the returned read future is completed.

Parameters
buffer:Buffer

the Buffer to use

Returns:IoReadFuture

The IoReadFuture for the operation

Annotations
@Override
removeCloseFutureListenerback to summary
public void removeCloseFutureListener(SshFutureListener<CloseFuture> listener)

Implements org.apache.sshd.common.Closeable.removeCloseFutureListener.

Doc from org.apache.sshd.common.Closeable.removeCloseFutureListener.

Remove a pre-registered close event listener

Parameters
listener:SshFutureListener<CloseFuture>

The register SshFutureListener - never null. Ignored if not registered or resource already closed

Annotations
@Override
valueOfback to summary
public static AbstractClientChannel.NullIoInputStream valueOf(String name)
valuesback to summary
public static AbstractClientChannel.NullIoInputStream[] values()