Spring Integration

org.springframework.integration.sftp
Interface SftpSessionPool

All Known Implementing Classes:
QueuedSftpSessionPool

public interface SftpSessionPool

Holds instances of SftpSession since they're stateful and might be in use while another run happens.

Author:
Josh Long

Method Summary
 SftpSession getSession()
          this returns a session that can be used to connct to an sftp instance and perform operations
 void release(SftpSession session)
          Frees up the client.
 

Method Detail

getSession

SftpSession getSession()
                       throws Exception
this returns a session that can be used to connct to an sftp instance and perform operations

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

void release(SftpSession session)
Frees up the client. Im not sure what the meaningful semantics of this are. Perhaps it just calls (session ,channel).disconnect() ?

Parameters:
session - the session to relinquish / renew

Spring Integration

Copyright © 2010. All Rights Reserved.