Class ListenFTP

java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.processor.AbstractSessionFactoryProcessor
org.apache.nifi.processors.standard.ListenFTP
All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent, org.apache.nifi.processor.Processor

@InputRequirement(INPUT_FORBIDDEN) @Tags({"ingest","FTP","FTPS","listen"}) @CapabilityDescription("Starts an FTP server that listens on the specified port and transforms incoming files into FlowFiles. The URI of the service will be ftp://{hostname}:{port}. The default port is 2221.") @WritesAttribute(attribute="filename",description="The name of the file received via the FTP/FTPS connection.") @WritesAttribute(attribute="path",description="The path pointing to the file\'s target directory. E.g.: file.txt is uploaded to /Folder1/SubFolder, then the value of the path attribute will be \"/Folder1/SubFolder/\" (note that it ends with a separator character).") public class ListenFTP extends org.apache.nifi.processor.AbstractSessionFactoryProcessor
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.apache.nifi.components.PropertyDescriptor
     
    private FtpServer
     
    static final org.apache.nifi.components.PropertyDescriptor
     
    static final org.apache.nifi.components.PropertyDescriptor
     
    private static final List<org.apache.nifi.components.PropertyDescriptor>
     
    static final org.apache.nifi.processor.Relationship
     
    private static final Set<org.apache.nifi.processor.Relationship>
     
    private final AtomicReference<org.apache.nifi.processor.ProcessSessionFactory>
     
     
    static final org.apache.nifi.components.PropertyDescriptor
     
    static final org.apache.nifi.components.PropertyDescriptor
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private org.apache.nifi.components.ValidationResult
    createValidationResult(String subject, String explanation)
     
    protected Collection<org.apache.nifi.components.ValidationResult>
    customValidate(org.apache.nifi.components.ValidationContext context)
     
    Set<org.apache.nifi.processor.Relationship>
     
    protected List<org.apache.nifi.components.PropertyDescriptor>
     
    void
     
    void
    onTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSessionFactory sessionFactory)
     
    void
    startFtpServer(org.apache.nifi.processor.ProcessContext context)
     
    void
     
    private org.apache.nifi.components.ValidationResult
    usernameOrPasswordIsNull(org.apache.nifi.components.PropertyDescriptor nullProperty)
     
    private void
    validateBindAddress(org.apache.nifi.components.ValidationContext context, Collection<org.apache.nifi.components.ValidationResult> validationResults)
     
    private void
    validateUsernameAndPassword(org.apache.nifi.components.ValidationContext context, Collection<org.apache.nifi.components.ValidationResult> validationResults)
     

    Methods inherited from class org.apache.nifi.processor.AbstractSessionFactoryProcessor

    getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrue

    Methods inherited from class org.apache.nifi.components.AbstractConfigurableComponent

    equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validate

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.nifi.components.ConfigurableComponent

    getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate

    Methods inherited from interface org.apache.nifi.processor.Processor

    isStateful, migrateRelationships
  • Field Details

    • SSL_CONTEXT_SERVICE

      public static final org.apache.nifi.components.PropertyDescriptor SSL_CONTEXT_SERVICE
    • ADDRESS

      public static final org.apache.nifi.components.PropertyDescriptor ADDRESS
    • PORT

      public static final org.apache.nifi.components.PropertyDescriptor PORT
    • USERNAME

      public static final org.apache.nifi.components.PropertyDescriptor USERNAME
    • PASSWORD

      public static final org.apache.nifi.components.PropertyDescriptor PASSWORD
    • PROPERTY_DESCRIPTORS

      private static final List<org.apache.nifi.components.PropertyDescriptor> PROPERTY_DESCRIPTORS
    • RELATIONSHIP_SUCCESS

      public static final org.apache.nifi.processor.Relationship RELATIONSHIP_SUCCESS
    • RELATIONSHIPS

      private static final Set<org.apache.nifi.processor.Relationship> RELATIONSHIPS
    • ftpServer

      private volatile FtpServer ftpServer
    • sessionFactorySetSignal

      private volatile CountDownLatch sessionFactorySetSignal
    • sessionFactory

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

    • ListenFTP

      public ListenFTP()
  • Method Details

    • migrateProperties

      public void migrateProperties(PropertyConfiguration propertyConfiguration)
    • getSupportedPropertyDescriptors

      protected List<org.apache.nifi.components.PropertyDescriptor> getSupportedPropertyDescriptors()
      Overrides:
      getSupportedPropertyDescriptors in class org.apache.nifi.components.AbstractConfigurableComponent
    • getRelationships

      public Set<org.apache.nifi.processor.Relationship> getRelationships()
      Specified by:
      getRelationships in interface org.apache.nifi.processor.Processor
      Overrides:
      getRelationships in class org.apache.nifi.processor.AbstractSessionFactoryProcessor
    • startFtpServer

      @OnScheduled public void startFtpServer(org.apache.nifi.processor.ProcessContext context)
    • stopFtpServer

      @OnStopped public void stopFtpServer()
    • onTrigger

      public void onTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSessionFactory sessionFactory) throws org.apache.nifi.processor.exception.ProcessException
      Throws:
      org.apache.nifi.processor.exception.ProcessException
    • customValidate

      protected Collection<org.apache.nifi.components.ValidationResult> customValidate(org.apache.nifi.components.ValidationContext context)
      Overrides:
      customValidate in class org.apache.nifi.components.AbstractConfigurableComponent
    • validateUsernameAndPassword

      private void validateUsernameAndPassword(org.apache.nifi.components.ValidationContext context, Collection<org.apache.nifi.components.ValidationResult> validationResults)
    • validateBindAddress

      private void validateBindAddress(org.apache.nifi.components.ValidationContext context, Collection<org.apache.nifi.components.ValidationResult> validationResults)
    • usernameOrPasswordIsNull

      private org.apache.nifi.components.ValidationResult usernameOrPasswordIsNull(org.apache.nifi.components.PropertyDescriptor nullProperty)
    • createValidationResult

      private org.apache.nifi.components.ValidationResult createValidationResult(String subject, String explanation)