org.springframework.integration.sftp
Class QueuedSftpSessionPool
java.lang.Object
org.springframework.integration.sftp.QueuedSftpSessionPool
- All Implemented Interfaces:
- InitializingBean, SftpSessionPool
public class QueuedSftpSessionPool
- extends Object
- implements SftpSessionPool, InitializingBean
This approach - of having a SessionPool (SftpSessionPool
) that has an
implementation of Queued*SessionPool (QueuedSftpSessionPool
) - was
taken pretty directly from the incredibly good Spring IntegrationFTP adapter.
- Since:
- 2.0
- Author:
- Josh Long
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_POOL_SIZE
public static final int DEFAULT_POOL_SIZE
- See Also:
- Constant Field Values
QueuedSftpSessionPool
public QueuedSftpSessionPool(SftpSessionFactory factory)
QueuedSftpSessionPool
public QueuedSftpSessionPool(int maxPoolSize,
SftpSessionFactory sessionFactory)
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Specified by:
afterPropertiesSet
in interface InitializingBean
- Throws:
Exception
getSession
public SftpSession getSession()
throws Exception
- Description copied from interface:
SftpSessionPool
- this returns a session that can be used to connct to an sftp instance and perform operations
- Specified by:
getSession
in interface SftpSessionPool
- Returns:
- the session from the pool ready to be connected to.
- Throws:
Exception
- thrown if theres any of the numerous faults possible when trying to connect to the remote
server
release
public void release(SftpSession session)
- Description copied from interface:
SftpSessionPool
- Frees up the client. Im not sure what the meaningful semantics of this are. Perhaps it just calls
(session
,channel).disconnect()
?
- Specified by:
release
in interface SftpSessionPool
- Parameters:
session
- the session to relinquish / renew
Copyright © 2010. All Rights Reserved.