use of com.adaptris.core.Poller in project interlok by adaptris.
the class SftpConsumerTest method createConsumerExamples.
private List createConsumerExamples(FileTransferConnection conn, Poller... pollers) {
List<StandaloneConsumer> result = new ArrayList();
try {
for (Poller p : pollers) {
FtpConsumer ftp = new FtpConsumer();
ftp.setProcDirectory("/proc");
ftp.setFtpEndpoint("sftp://overrideuser@hostname:port/path/to/directory");
ftp.setFilterExpression("*.xml");
ftp.setPoller(p);
result.add(new StandaloneConsumer(conn, ftp));
}
} catch (Exception e) {
throw new RuntimeException(e);
}
return result;
}
use of com.adaptris.core.Poller in project interlok by adaptris.
the class FsConsumerCase method retrieveObjectsForSampleConfig.
@Override
protected List retrieveObjectsForSampleConfig() {
ArrayList result = new ArrayList();
for (FilterImplementation filter : FilterImplementation.values()) {
for (Poller poller : POLLER_LIST) {
for (FileSortImplementation sort : FileSortImplementation.values()) {
StandaloneConsumer sc = new StandaloneConsumer(createConsumer(null));
((FsConsumerImpl) sc.getConsumer()).setPoller(poller);
((FsConsumerImpl) sc.getConsumer()).setBaseDirectoryUrl(filter.getEndpoint());
((FsConsumerImpl) sc.getConsumer()).setFilterExpression(filter.getExpression());
((FsConsumerImpl) sc.getConsumer()).setFileFilterImp(filter.getImpl());
((FsConsumerImpl) sc.getConsumer()).setFileSorter(sort.getImplementation());
result.add(sc);
}
}
}
return result;
}
use of com.adaptris.core.Poller in project interlok by adaptris.
the class RelaxedSftpConsumerTest method createConsumerExamples.
private List createConsumerExamples(FileTransferConnection conn, Poller... pollers) {
List<StandaloneConsumer> result = new ArrayList();
try {
for (Poller p : pollers) {
RelaxedFtpConsumer ftp = new RelaxedFtpConsumer();
ftp.setFtpEndpoint("sftp://overrideuser@hostname:port/path/to/directory");
ftp.setFilterExpression("*.xml");
ftp.setPoller(p);
result.add(new StandaloneConsumer(conn, ftp));
}
} catch (Exception e) {
throw new RuntimeException(e);
}
return result;
}
Aggregations