List of usage examples for org.apache.commons.net.ftp FTPReply isNegativeTransient
public static boolean isNegativeTransient(int reply)
From source file:com.clickha.nifi.processors.util.FTPTransferV2.java
public void sendCommands(final List<String> commands, final FlowFile flowFile) throws IOException { if (commands.isEmpty()) { return;//from ww w .java 2 s.com } final FTPClient client = getClient(flowFile); for (String cmd : commands) { if (!cmd.isEmpty()) { int result; result = client.sendCommand(cmd); logger.debug(this + " sent command to the FTP server: " + cmd + " for " + flowFile); if (FTPReply.isNegativePermanent(result) || FTPReply.isNegativeTransient(result)) { throw new IOException(this + " negative reply back from FTP server cmd: " + cmd + " reply:" + result + ": " + client.getReplyString() + " for " + flowFile); } } } }