@Override public void flush() throws IOException { final FTPClient client = getClient(null); client.completePendingCommand(); }
@Override public boolean flush(final FlowFile flowFile) throws IOException { return getClient(flowFile).completePendingCommand(); }
@Override public void close() throws IOException { super.close(); if (!client.isConnected()) { throw new FTPException("Client not connected"); } boolean cmdCompleted = client.completePendingCommand(); disconnect(client); if (!cmdCompleted) { throw new FTPException("Could not complete transfer, Reply Code - " + client.getReplyCode()); } } };
@Override public synchronized void close() throws IOException { if (closed) { return; } super.close(); closed = true; if (!client.isConnected()) { throw new FTPException("Client not connected"); } boolean cmdCompleted = client.completePendingCommand(); client.logout(); client.disconnect(); if (!cmdCompleted) { throw new FTPException("Could not complete transfer, Reply Code - " + client.getReplyCode()); } }
@Override public boolean finalizeRaw() throws IOException { if (!this.readingRaw.compareAndSet(true, false)) { throw new IOException("Raw read is not in process"); } if (this.client.completePendingCommand()) { int replyCode = this.client.getReplyCode(); if (this.logger.isDebugEnabled()) { this.logger.debug(this + " finalizeRaw - reply code: " + replyCode); } return FTPReply.isPositiveCompletion(replyCode); } throw new IOException("completePendingCommandFailed"); }
socket.close(); if (completePendingCommand())
/** * Initiate list parsing for MLSD listings. * * @param pathname * @return the engine * @throws IOException */ private FTPListParseEngine initiateMListParsing(String pathname) throws IOException { Socket socket = _openDataConnection_(FTPCmd.MLSD, pathname); FTPListParseEngine engine = new FTPListParseEngine(MLSxEntryParser.getInstance(), __configuration); if (socket == null) { return engine; } try { engine.readServerList(socket.getInputStream(), getControlEncoding()); } finally { Util.closeQuietly(socket); completePendingCommand(); } return engine; }
completePendingCommand(); return engine;
boolean ok = completePendingCommand(); return ok;
@Override public boolean completePendingCommand() throws IOException { return client.completePendingCommand(); } }
boolean ok = completePendingCommand(); return ok;
@Override public boolean completePendingCommand() throws IOException { if (ftpClient != null) { return getFtpClient().completePendingCommand(); } return true; }
@Override public boolean completePendingCommand() throws IOException { if (ftpClient != null) { return getFtpClient().completePendingCommand(); } return true; }
public boolean completePendingCommand() throws IOException { if (ftpClient != null) { return getFtpClient().completePendingCommand(); } return true; }
@Override public boolean completePendingCommand() throws IOException { if (ftpClient != null) { return getFtpClient().completePendingCommand(); } return true; }
@Override public boolean completePendingCommand() throws IOException { if (ftpClient != null) { return getFtpClient().completePendingCommand(); } return true; }
@Override public void flush() throws IOException { final FTPClient client = getClient(null); client.completePendingCommand(); }
@Override public boolean flush(final FlowFile flowFile) throws IOException { return getClient(flowFile).completePendingCommand(); }
@Override public void releaseRetrievedFileResources(Exchange exchange) throws GenericFileOperationFailedException { InputStream is = exchange.getIn().getHeader(RemoteFileComponent.REMOTE_FILE_INPUT_STREAM, InputStream.class); if (is != null) { try { IOHelper.close(is); client.completePendingCommand(); } catch (IOException e) { throw new GenericFileOperationFailedException(e.getMessage(), e); } } }
@Override public void close() throws IOException { super.close(); if (!client.isConnected()) { throw new FTPException("Client not connected"); } boolean cmdCompleted = client.completePendingCommand(); disconnect(client); if (!cmdCompleted) { throw new FTPException("Could not complete transfer, Reply Code - " + client.getReplyCode()); } } };