Class DelegatingSessionFactory<F>
java.lang.Object
org.springframework.integration.file.remote.session.DelegatingSessionFactory<F>
- Type Parameters:
- F- the target system file type.
- All Implemented Interfaces:
- SessionFactory<F>
- Since:
- 4.2
- Author:
- Gary Russell
- 
Constructor SummaryConstructorsConstructorDescriptionDelegatingSessionFactory(Map<Object, SessionFactory<F>> factories, SessionFactory<F> defaultFactory) Construct an instance with aDefaultSessionFactoryLocatorusing the supplied factories and default key.DelegatingSessionFactory(SessionFactoryLocator<F> factoryLocator) Construct an instance using the supplied factory.
- 
Method SummaryModifier and TypeMethodDescriptionvoidClear the key for this thread.Message<?> clearThreadKey(Message<?> message) Messaging-friendly version ofclearThreadKey()that can be invoked from a service activator.Return this factory's locator.getSession(Object key) voidsetThreadKey(Object key) Set a key to be used forgetSession()on this thread.Message<?> setThreadKey(Message<?> message, Object key) Messaging-friendly version ofsetThreadKey(Object)that can be invoked from a service activator.
- 
Constructor Details- 
DelegatingSessionFactorypublic DelegatingSessionFactory(Map<Object, SessionFactory<F>> factories, SessionFactory<F> defaultFactory) Construct an instance with aDefaultSessionFactoryLocatorusing the supplied factories and default key.- Parameters:
- factories- the factories.
- defaultFactory- the default to use if the lookup fails.
 
- 
DelegatingSessionFactoryConstruct an instance using the supplied factory.- Parameters:
- factoryLocator- the factory.
 
 
- 
- 
Method Details- 
getFactoryLocatorReturn this factory's locator.- Returns:
- the locator.
 
- 
setThreadKeySet a key to be used forgetSession()on this thread.- Parameters:
- key- the key.
 
- 
clearThreadKeypublic void clearThreadKey()Clear the key for this thread.
- 
setThreadKeyMessaging-friendly version ofsetThreadKey(Object)that can be invoked from a service activator.- Parameters:
- message- the message.
- key- the key.
- Returns:
- the message (unchanged).
 
- 
clearThreadKeyMessaging-friendly version ofclearThreadKey()that can be invoked from a service activator.- Parameters:
- message- the message.
- Returns:
- the message (unchanged).
 
- 
getSession- Specified by:
- getSessionin interface- SessionFactory<F>
 
- 
getSession
 
-