org.springframework.integration.file.remote.session
Class CachingSessionFactory

java.lang.Object
  extended by org.springframework.integration.file.remote.session.CachingSessionFactory
All Implemented Interfaces:
DisposableBean, SessionFactory

public class CachingSessionFactory
extends java.lang.Object
implements SessionFactory, DisposableBean

A SessionFactory implementation that caches Sessions for reuse without requiring reconnection each time the Session is retrieved from the factory. This implementation wraps and delegates to a target SessionFactory instance.

Since:
2.0

Field Summary
static int DEFAULT_POOL_SIZE
           
 
Constructor Summary
CachingSessionFactory(SessionFactory sessionFactory)
           
CachingSessionFactory(SessionFactory sessionFactory, int maxPoolSize)
           
 
Method Summary
 void destroy()
           
 Session getSession()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_POOL_SIZE

public static final int DEFAULT_POOL_SIZE
See Also:
Constant Field Values
Constructor Detail

CachingSessionFactory

public CachingSessionFactory(SessionFactory sessionFactory)

CachingSessionFactory

public CachingSessionFactory(SessionFactory sessionFactory,
                             int maxPoolSize)
Method Detail

getSession

public Session getSession()
Specified by:
getSession in interface SessionFactory

destroy

public void destroy()
Specified by:
destroy in interface DisposableBean