Class FtpCommandSTOR
java.lang.Object
org.apache.ftpserver.command.AbstractCommand
org.apache.nifi.processors.standard.ftp.commands.FtpCommandSTOR
- All Implemented Interfaces:
org.apache.ftpserver.command.Command
public class FtpCommandSTOR
extends org.apache.ftpserver.command.AbstractCommand
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerprivate final org.apache.nifi.processor.Relationshipprivate final AtomicReference<org.apache.nifi.processor.ProcessSessionFactory> private final CountDownLatch -
Constructor Summary
ConstructorsConstructorDescriptionFtpCommandSTOR(AtomicReference<org.apache.nifi.processor.ProcessSessionFactory> sessionFactory, CountDownLatch sessionFactorySetSignal, org.apache.nifi.processor.Relationship relationshipSuccess) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcheckDataConnection(org.apache.ftpserver.impl.FtpIoSession ftpSession) private voidcheckWritePermission(org.apache.ftpserver.ftplet.FtpFile ftpFile) private org.apache.nifi.processor.ProcessSessionvoidexecute(org.apache.ftpserver.impl.FtpIoSession ftpSession, org.apache.ftpserver.impl.FtpServerContext context, org.apache.ftpserver.ftplet.FtpRequest request) private voidexecuteCommand(org.apache.ftpserver.impl.FtpIoSession ftpSession, org.apache.ftpserver.impl.FtpServerContext context, org.apache.ftpserver.ftplet.FtpRequest request) private StringgetArgument(org.apache.ftpserver.ftplet.FtpRequest request) private org.apache.ftpserver.ftplet.FtpFilegetFtpFile(org.apache.ftpserver.impl.FtpIoSession ftpSession, String fileName) private StringgetPath(org.apache.ftpserver.ftplet.FtpFile ftpFile) private org.apache.nifi.processor.ProcessSessionFactoryprivate org.apache.ftpserver.ftplet.DataConnectionopenDataConnection(org.apache.ftpserver.impl.FtpIoSession ftpSession, org.apache.ftpserver.ftplet.FtpFile ftpFile) private voidsendFileStatusOkay(org.apache.ftpserver.impl.FtpIoSession ftpSession, org.apache.ftpserver.impl.FtpServerContext context, org.apache.ftpserver.ftplet.FtpRequest request, String fileAbsolutePath) private voidtransferData(org.apache.ftpserver.ftplet.DataConnection dataConnection, org.apache.ftpserver.impl.FtpIoSession ftpSession, org.apache.ftpserver.impl.FtpServerContext context, org.apache.ftpserver.ftplet.FtpRequest request, org.apache.ftpserver.ftplet.FtpFile ftpFile)
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG -
sessionFactory
-
sessionFactorySetSignal
-
relationshipSuccess
private final org.apache.nifi.processor.Relationship relationshipSuccess
-
-
Constructor Details
-
FtpCommandSTOR
public FtpCommandSTOR(AtomicReference<org.apache.nifi.processor.ProcessSessionFactory> sessionFactory, CountDownLatch sessionFactorySetSignal, org.apache.nifi.processor.Relationship relationshipSuccess)
-
-
Method Details
-
execute
public void execute(org.apache.ftpserver.impl.FtpIoSession ftpSession, org.apache.ftpserver.impl.FtpServerContext context, org.apache.ftpserver.ftplet.FtpRequest request) -
executeCommand
private void executeCommand(org.apache.ftpserver.impl.FtpIoSession ftpSession, org.apache.ftpserver.impl.FtpServerContext context, org.apache.ftpserver.ftplet.FtpRequest request) throws FtpCommandException - Throws:
FtpCommandException
-
getArgument
private String getArgument(org.apache.ftpserver.ftplet.FtpRequest request) throws FtpCommandException - Throws:
FtpCommandException
-
checkDataConnection
private void checkDataConnection(org.apache.ftpserver.impl.FtpIoSession ftpSession) throws FtpCommandException - Throws:
FtpCommandException
-
getFtpFile
private org.apache.ftpserver.ftplet.FtpFile getFtpFile(org.apache.ftpserver.impl.FtpIoSession ftpSession, String fileName) throws FtpCommandException - Throws:
FtpCommandException
-
checkWritePermission
private void checkWritePermission(org.apache.ftpserver.ftplet.FtpFile ftpFile) throws FtpCommandException - Throws:
FtpCommandException
-
sendFileStatusOkay
private void sendFileStatusOkay(org.apache.ftpserver.impl.FtpIoSession ftpSession, org.apache.ftpserver.impl.FtpServerContext context, org.apache.ftpserver.ftplet.FtpRequest request, String fileAbsolutePath) -
openDataConnection
private org.apache.ftpserver.ftplet.DataConnection openDataConnection(org.apache.ftpserver.impl.FtpIoSession ftpSession, org.apache.ftpserver.ftplet.FtpFile ftpFile) throws FtpCommandException - Throws:
FtpCommandException
-
transferData
private void transferData(org.apache.ftpserver.ftplet.DataConnection dataConnection, org.apache.ftpserver.impl.FtpIoSession ftpSession, org.apache.ftpserver.impl.FtpServerContext context, org.apache.ftpserver.ftplet.FtpRequest request, org.apache.ftpserver.ftplet.FtpFile ftpFile) throws FtpCommandException - Throws:
FtpCommandException
-
getPath
-
createProcessSession
private org.apache.nifi.processor.ProcessSession createProcessSession() throws InterruptedException, TimeoutException- Throws:
InterruptedExceptionTimeoutException
-
getProcessSessionFactory
private org.apache.nifi.processor.ProcessSessionFactory getProcessSessionFactory() throws InterruptedException, TimeoutException- Throws:
InterruptedExceptionTimeoutException
-