@Test public void testProduce() throws Exception { EmbeddedFtpServer helper = new EmbeddedFtpServer(); FileSystem filesystem = helper.createFilesystem_DirsOnly(); FakeFtpServer server = helper.createAndStart(filesystem); try { FtpProducer ftpProducer = createForTests(); FtpConnection produceConnection = create(server); StandaloneProducer sp = new StandaloneProducer(produceConnection, ftpProducer); LifecycleHelper.prepare(sp); AdaptrisMessage msg = AdaptrisMessageFactory.getDefaultInstance().newMessage(PAYLOAD); ServiceCase.execute(sp, msg); assertEquals(1, filesystem.listFiles(DEFAULT_WORK_DIR_CANONICAL).size()); } finally { server.stop(); } }
@Override public void prepare() throws CoreException { logWarningIfNotNull(destWarning, () -> destWarning = true, getDestination(), "{} uses destination, use 'ftp-url' instead", LoggingHelper.friendlyName(this)); logWarningIfNotNull(requestReplyWarning, () -> requestReplyWarning = true, getReplyDirectory(), "{} uses reply-directory, request reply via FTP will be removed without warning", LoggingHelper.friendlyName(this)); mustHaveEither(getFtpEndpoint(), getDestination()); registerEncoderMessageFactory(); }
FtpProducer extends RequestReplyProducerImp { @Override public void prepare() throws CoreException { logWarningIfNotNull(destWarning, () -> destWarning = true, getDestination(), "{} uses destination, use 'ftp-url' instead", LoggingHelper.friendlyName(this)); logWarningIfNotNull(requestReplyWarning, () -> requestReplyWarning = true, getReplyDirectory(), "{} uses reply-directory, request reply via FTP will be removed without warning", LoggingHelper.friendlyName(this)); mustHaveEither(getFtpEndpoint(), getDestination()); registerEncoderMessageFactory(); } }
FtpProducer extends RequestReplyProducerImp { @Override public void prepare() throws CoreException { logWarningIfNotNull(destWarning, () -> destWarning = true, getDestination(), "{} uses destination, use 'ftp-url' instead", LoggingHelper.friendlyName(this)); logWarningIfNotNull(requestReplyWarning, () -> requestReplyWarning = true, getReplyDirectory(), "{} uses reply-directory, request reply via FTP will be removed without warning", LoggingHelper.friendlyName(this)); mustHaveEither(getFtpEndpoint(), getDestination()); registerEncoderMessageFactory(); } FtpProducer(); }
FtpProducer extends RequestReplyProducerImp { @Override public void prepare() throws CoreException { logWarningIfNotNull(destWarning, () -> destWarning = true, getDestination(), "{} uses destination, use 'ftp-url' instead", LoggingHelper.friendlyName(this)); logWarningIfNotNull(requestReplyWarning, () -> requestReplyWarning = true, getReplyDirectory(), "{} uses reply-directory, request reply via FTP will be removed without warning", LoggingHelper.friendlyName(this)); mustHaveEither(getFtpEndpoint(), getDestination()); registerEncoderMessageFactory(); } FtpProducer(); @Override void init(); @Override void doProduce(AdaptrisMessage msg, String endpoint); @Override void prepare(); String getBuildDirectory(); String getDestDirectory(); void setBuildDirectory(String string); void setDestDirectory(String string); @Deprecated @Removal(version = "4.0") boolean replyUsesEncoder(); FileNameCreator getFilenameCreator(); void setFilenameCreator(FileNameCreator creator); @Override String endpoint(AdaptrisMessage msg); }
FtpProducer extends RequestReplyProducerImp { @Override public void prepare() throws CoreException { logWarningIfNotNull(destWarning, () -> destWarning = true, getDestination(), "{} uses destination, use 'ftp-url' instead", LoggingHelper.friendlyName(this)); logWarningIfNotNull(requestReplyWarning, () -> requestReplyWarning = true, getReplyDirectory(), "{} uses reply-directory, request reply via FTP will be removed without warning", LoggingHelper.friendlyName(this)); mustHaveEither(getFtpEndpoint(), getDestination()); registerEncoderMessageFactory(); } FtpProducer(); @Override void init(); @Override void doProduce(AdaptrisMessage msg, String endpoint); @Override void prepare(); String getBuildDirectory(); String getDestDirectory(); void setBuildDirectory(String string); void setDestDirectory(String string); @Deprecated @Removal(version = "4.0") boolean replyUsesEncoder(); FileNameCreator getFilenameCreator(); void setFilenameCreator(FileNameCreator creator); @Override String endpoint(AdaptrisMessage msg);  }