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

    Fields
    Modifier and Type
    Field
    Description
    private static final org.slf4j.Logger
     
    private final org.apache.nifi.processor.Relationship
     
    private final AtomicReference<org.apache.nifi.processor.ProcessSessionFactory>
     
    private final CountDownLatch
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    FtpCommandSTOR(AtomicReference<org.apache.nifi.processor.ProcessSessionFactory> sessionFactory, CountDownLatch sessionFactorySetSignal, org.apache.nifi.processor.Relationship relationshipSuccess)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private void
    checkDataConnection(org.apache.ftpserver.impl.FtpIoSession ftpSession)
     
    private void
    checkWritePermission(org.apache.ftpserver.ftplet.FtpFile ftpFile)
     
    private org.apache.nifi.processor.ProcessSession
     
    void
    execute(org.apache.ftpserver.impl.FtpIoSession ftpSession, org.apache.ftpserver.impl.FtpServerContext context, org.apache.ftpserver.ftplet.FtpRequest request)
     
    private void
    executeCommand(org.apache.ftpserver.impl.FtpIoSession ftpSession, org.apache.ftpserver.impl.FtpServerContext context, org.apache.ftpserver.ftplet.FtpRequest request)
     
    private String
    getArgument(org.apache.ftpserver.ftplet.FtpRequest request)
     
    private org.apache.ftpserver.ftplet.FtpFile
    getFtpFile(org.apache.ftpserver.impl.FtpIoSession ftpSession, String fileName)
     
    private String
    getPath(org.apache.ftpserver.ftplet.FtpFile ftpFile)
     
    private org.apache.nifi.processor.ProcessSessionFactory
     
    private org.apache.ftpserver.ftplet.DataConnection
    openDataConnection(org.apache.ftpserver.impl.FtpIoSession ftpSession, org.apache.ftpserver.ftplet.FtpFile ftpFile)
     
    private void
    sendFileStatusOkay(org.apache.ftpserver.impl.FtpIoSession ftpSession, org.apache.ftpserver.impl.FtpServerContext context, org.apache.ftpserver.ftplet.FtpRequest request, String fileAbsolutePath)
     
    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)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • LOG

      private static final org.slf4j.Logger LOG
    • sessionFactory

      private final AtomicReference<org.apache.nifi.processor.ProcessSessionFactory> sessionFactory
    • sessionFactorySetSignal

      private final CountDownLatch 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

      private String getPath(org.apache.ftpserver.ftplet.FtpFile ftpFile)
    • createProcessSession

      private org.apache.nifi.processor.ProcessSession createProcessSession() throws InterruptedException, TimeoutException
      Throws:
      InterruptedException
      TimeoutException
    • getProcessSessionFactory

      private org.apache.nifi.processor.ProcessSessionFactory getProcessSessionFactory() throws InterruptedException, TimeoutException
      Throws:
      InterruptedException
      TimeoutException