Package org.apache.sshd.sftp.client.fs
Class SftpFileSystem.SftpClientHandle
java.lang.Object
org.apache.sshd.sftp.client.fs.SftpFileSystem.SftpClientHandle
- All Implemented Interfaces:
EventListener
,ChannelListener
,SshdEventListener
- Enclosing class:
SftpFileSystem
The
SftpFileSystem.SftpClientPool
stores SftpClient
s not directly but via handles in its channel pool. HAndles
remove themselves from the pool-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SftpClient
private Future
<?> private final BlockingQueue
<? extends SftpFileSystem.SftpClientHandle> Fields inherited from interface org.apache.sshd.common.channel.ChannelListener
EMPTY
-
Constructor Summary
ConstructorsConstructorDescriptionSftpClientHandle
(BlockingQueue<? extends SftpFileSystem.SftpClientHandle> pool, SftpClient client) -
Method Summary
Modifier and TypeMethodDescriptionvoid
channelClosed
(Channel channel, Throwable reason) Called to inform about a channel being closed.void
destroy()
void
setExpiration
(Future<?> future) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.sshd.common.channel.ChannelListener
channelInitialized, channelOpenFailure, channelOpenSuccess, channelStateChanged
-
Field Details
-
client
-
pool
-
expiration
-
-
Constructor Details
-
SftpClientHandle
public SftpClientHandle(BlockingQueue<? extends SftpFileSystem.SftpClientHandle> pool, SftpClient client)
-
-
Method Details
-
destroy
public void destroy() -
getClient
-
setExpiration
-
channelClosed
Description copied from interface:ChannelListener
Called to inform about a channel being closed. Note: when the call is made there are no guarantees about the channel's actual state except that it either has been already closed or may be in the process of being closed. Note: this method is guaranteed to be called regardless of whetherChannelListener.channelOpenSuccess(Channel)
orChannelListener.channelOpenFailure(Channel, Throwable)
have been called- Specified by:
channelClosed
in interfaceChannelListener
- Parameters:
channel
- The referencedChannel
reason
- The reason why the channel is being closed - ifnull
then normal closure
-