INT-1614 renaming ClientFactory to SessionFactory

This commit is contained in:
Mark Fisher
2010-11-19 18:35:16 -05:00
parent b37863a6e4
commit ff85df9e99
13 changed files with 31 additions and 31 deletions

View File

@@ -65,4 +65,5 @@ public abstract class AbstractFtpOutboundChannelAdapterParser extends AbstractOu
}
protected abstract String getClassName();
}

View File

@@ -25,7 +25,7 @@ import org.apache.commons.net.ftp.FTPClient;
* @author Iwein Fuld
* @author Josh Long
*/
public class DefaultFtpClientFactory extends AbstractFtpSessionFactory<FTPClient> {
public class DefaultFtpSessionFactory extends AbstractFtpSessionFactory<FTPClient> {
@Override
protected FTPClient createSingleInstanceOfClient() {

View File

@@ -27,12 +27,12 @@ import org.apache.commons.net.ftp.FTPSClient;
import org.springframework.util.StringUtils;
/**
* provides a working FTPS implementation. Based heavily on {@link org.springframework.integration.ftp.session.DefaultFtpClientFactory}
* provides a working FTPS implementation. Based heavily on {@link org.springframework.integration.ftp.session.DefaultFtpSessionFactory}
*
* @author Josh Long
* @author Iwein Fuld
*/
public class DefaultFtpsClientFactory extends AbstractFtpSessionFactory<FTPSClient> {
public class DefaultFtpsSessionFactory extends AbstractFtpSessionFactory<FTPSClient> {
private Boolean useClientMode;

View File

@@ -10,7 +10,7 @@
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/integration/ftp http://www.springframework.org/schema/integration/ftp/spring-integration-ftp.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<bean id="ftpClientFactory" class="org.springframework.integration.ftp.session.DefaultFtpClientFactory">
<bean id="ftpSessionFactory" class="org.springframework.integration.ftp.session.DefaultFtpSessionFactory">
<property name="host" value="localhost"/>
<property name="port" value="22"/>
<property name="username" value="oleg"/>
@@ -21,7 +21,7 @@
</bean>
<ftp:inbound-channel-adapter id="adapterFtp"
session-factory="ftpClientFactory"
session-factory="ftpSessionFactory"
channel="ftpIn"
filename-pattern="foo"
local-working-directory="file:target/foo"
@@ -33,7 +33,7 @@
<ftp:inbound-channel-adapter id="adapterFtp2"
session-factory="ftpClientFactory"
session-factory="ftpSessionFactory"
channel="ftpIn"
filter="filter"
local-working-directory="file:target"

View File

@@ -10,7 +10,7 @@
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/integration/ftp http://www.springframework.org/schema/integration/ftp/spring-integration-ftp.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<bean id="ftpClientFactory" class="org.springframework.integration.ftp.session.DefaultFtpClientFactory">
<bean id="ftpSessionFactory" class="org.springframework.integration.ftp.session.DefaultFtpSessionFactory">
<property name="host" value="localhost"/>
<property name="port" value="22"/>
<property name="username" value="oleg"/>
@@ -22,7 +22,7 @@
<ftp:inbound-channel-adapter id="adapterFtpDontAutoCreate"
channel="ftpIn"
session-factory="ftpClientFactory"
session-factory="ftpSessionFactory"
filter="filter"
local-working-directory="file:target/bar"
remote-directory="foo/bar"

View File

@@ -10,7 +10,7 @@
<int:channel id="ftpOutbound"/>
<bean id="ftpClientFactory" class="org.springframework.integration.ftp.session.DefaultFtpsClientFactory">
<bean id="ftpSessionFactory" class="org.springframework.integration.ftp.session.DefaultFtpsSessionFactory">
<property name="host" value="localhost"/>
<property name="port" value="22"/>
<property name="username" value="oleg"/>
@@ -21,7 +21,7 @@
</bean>
<int-ftp:outbound-channel-adapter id="ftpOutboundAdapter"
session-factory="ftpClientFactory"
session-factory="ftpSessionFactory"
remote-directory="foo/bar"
channel="ftpOutbound"
filename-generator="fileNameGenerator"/>

View File

@@ -7,13 +7,12 @@
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-2.0.xsd
http://www.springframework.org/schema/integration/ftp http://www.springframework.org/schema/integration/ftp/spring-integration-ftp-2.0.xsd">
<bean id="ftpClientFactory"
class="org.springframework.integration.ftp.config.FtpInboundChannelAdapterParserTests.TestClientFactoryBean"/>
<bean id="ftpSessionFactory"
class="org.springframework.integration.ftp.config.FtpInboundChannelAdapterParserTests.TestSessionFactoryBean"/>
<int-ftp:inbound-channel-adapter id="ftpInbound"
channel="ftpChannel"
session-factory="ftpClientFactory"
session-factory="ftpSessionFactory"
charset="UTF-8"
auto-create-directories="true"
auto-delete-remote-files-on-sync="true"
@@ -25,7 +24,7 @@
<int-ftp:inbound-channel-adapter
channel="ftpChannel"
session-factory="ftpClientFactory"
session-factory="ftpSessionFactory"
charset="UTF-8"
auto-create-directories="true"
auto-delete-remote-files-on-sync="true"

View File

@@ -25,7 +25,7 @@ import org.springframework.beans.factory.FactoryBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.integration.file.remote.session.Session;
import org.springframework.integration.ftp.session.DefaultFtpClientFactory;
import org.springframework.integration.ftp.session.DefaultFtpSessionFactory;
/**
* @author Oleg Zhurakousky
@@ -68,17 +68,17 @@ public class FtpInboundChannelAdapterParserTests {
// assertNotNull(adapter);
}
public static class TestClientFactoryBean implements FactoryBean<DefaultFtpClientFactory>{
public static class TestSessionFactoryBean implements FactoryBean<DefaultFtpSessionFactory>{
public DefaultFtpClientFactory getObject() throws Exception {
DefaultFtpClientFactory factory = mock(DefaultFtpClientFactory.class);
public DefaultFtpSessionFactory getObject() throws Exception {
DefaultFtpSessionFactory factory = mock(DefaultFtpSessionFactory.class);
Session session = mock(Session.class);
when(factory.getSession()).thenReturn(session);
return factory;
}
public Class<?> getObjectType() {
return DefaultFtpClientFactory.class;
return DefaultFtpSessionFactory.class;
}
public boolean isSingleton() {

View File

@@ -7,7 +7,7 @@
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-2.0.xsd
http://www.springframework.org/schema/integration/ftp http://www.springframework.org/schema/integration/ftp/spring-integration-ftp-2.0.xsd">
<bean id="ftpClientFactory" class="org.springframework.integration.ftp.session.DefaultFtpClientFactory">
<bean id="ftpSessionFactory" class="org.springframework.integration.ftp.session.DefaultFtpSessionFactory">
<property name="host" value="localhost"/>
<property name="port" value="22"/>
<property name="username" value="oleg"/>
@@ -19,7 +19,7 @@
<int-ftp:outbound-channel-adapter id="ftpOutbound"
channel="ftpChannel"
session-factory="ftpClientFactory"
session-factory="ftpSessionFactory"
remote-directory="foo/bar"
charset="UTF-8"
filename-generator="fileNameGenerator"/>

View File

@@ -7,7 +7,7 @@
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-2.0.xsd
http://www.springframework.org/schema/integration/ftp http://www.springframework.org/schema/integration/ftp/spring-integration-ftp-2.0.xsd">
<bean id="ftpClientFactory" class="org.springframework.integration.ftp.session.DefaultFtpClientFactory">
<bean id="ftpSessionFactory" class="org.springframework.integration.ftp.session.DefaultFtpSessionFactory">
<property name="host" value="localhost"/>
<property name="username" value="ozhurakousky"/>
<property name="password" value="seva@1994"/>
@@ -17,7 +17,7 @@
<int:channel id="ftpChannel"/>
<int-ftp:outbound-channel-adapter
client-factory="ftpClientFactory"
session-factory="ftpSessionFactory"
channel="ftpChannel"/>

View File

@@ -7,7 +7,7 @@
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-2.0.xsd
http://www.springframework.org/schema/integration/ftp http://www.springframework.org/schema/integration/ftp/spring-integration-ftp-2.0.xsd">
<bean id="ftpClientFactory" class="org.springframework.integration.ftp.session.DefaultFtpsClientFactory">
<bean id="ftpSessionFactory" class="org.springframework.integration.ftp.session.DefaultFtpsSessionFactory">
<property name="host" value="localhost"/>
<property name="port" value="22"/>
<property name="username" value="oleg"/>
@@ -19,7 +19,7 @@
<int-ftp:inbound-channel-adapter id="ftpInbound"
channel="ftpChannel"
session-factory="ftpClientFactory"
session-factory="ftpSessionFactory"
charset="UTF-8"
auto-create-directories="true"
auto-delete-remote-files-on-sync="true"
@@ -31,7 +31,7 @@
<int-ftp:inbound-channel-adapter
channel="ftpChannel"
session-factory="ftpClientFactory"
session-factory="ftpSessionFactory"
charset="UTF-8"
auto-create-directories="true"
auto-delete-remote-files-on-sync="true"

View File

@@ -14,7 +14,7 @@
<constructor-arg value="javax.net.ssl.TrustManager"/>
</bean>
<bean id="ftpClientFactory" class="org.springframework.integration.ftp.session.DefaultFtpsClientFactory">
<bean id="ftpSessionFactory" class="org.springframework.integration.ftp.session.DefaultFtpsSessionFactory">
<property name="host" value="localhost"/>
<property name="port" value="22"/>
<property name="username" value="oleg"/>
@@ -37,7 +37,7 @@
<int-ftp:outbound-channel-adapter id="ftpOutbound"
channel="ftpChannel"
session-factory="ftpClientFactory"
session-factory="ftpSessionFactory"
charset="UTF-8"
remote-directory="foo/bar"
filename-generator="fileNameGenerator"/>

View File

@@ -11,7 +11,7 @@
<int:message-history/>
<bean id="ftpClientFactory" class="org.springframework.integration.ftp.session.DefaultFtpClientFactory">
<bean id="ftpSessionFactory" class="org.springframework.integration.ftp.session.DefaultFtpSessionFactory">
<property name="host" value="localhost"/>
<property name="port" value="22"/>
<property name="username" value="oleg"/>
@@ -22,7 +22,7 @@
</bean>
<ftp:inbound-channel-adapter id="adapterFtp"
session-factory="ftpClientFactory"
session-factory="ftpSessionFactory"
channel="ftpIn"
auto-create-directories="true"
local-working-directory="file:target/foo"