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 SftpClients not directly but via handles in its channel pool. HAndles
remove themselves from the pool-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SftpClientprivate 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 TypeMethodDescriptionvoidchannelClosed(Channel channel, Throwable reason) Called to inform about a channel being closed.voiddestroy()voidsetExpiration(Future<?> future) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:ChannelListenerCalled 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:
channelClosedin interfaceChannelListener- Parameters:
channel- The referencedChannelreason- The reason why the channel is being closed - ifnullthen normal closure
-