org.springframework.integration.sftp.session
Class QueuedSftpSessionPool
java.lang.Object
org.springframework.integration.sftp.session.QueuedSftpSessionPool
- All Implemented Interfaces:
- InitializingBean, SftpSessionPool
public class QueuedSftpSessionPool
- extends java.lang.Object
- implements SftpSessionPool, InitializingBean
This approach - of having a SessionPool (SftpSessionPool
) that has an
implementation of Queued*SessionPool (QueuedSftpSessionPool
) - was
taken almost directly from the Spring Integration FTP adapter.
- Since:
- 2.0
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(SftpSessionFactoryBean factory)
QueuedSftpSessionPool
public QueuedSftpSessionPool(int maxPoolSize,
SftpSessionFactoryBean sessionFactory)
afterPropertiesSet
public void afterPropertiesSet()
throws java.lang.Exception
- Specified by:
afterPropertiesSet
in interface InitializingBean
- Throws:
java.lang.Exception
getSession
public SftpSession getSession()
throws java.lang.Exception
- Description copied from interface:
SftpSessionPool
- Returns a session that can be used to connect 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:
java.lang.Exception
- if any fault occurs when trying to connect to the remote server
release
public void release(SftpSession session)
- Description copied from interface:
SftpSessionPool
- Releases the session.
- Specified by:
release
in interface SftpSessionPool
- Parameters:
session
- the session to relinquish / renew