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
FieldsModifier and TypeFieldDescriptionstatic final org.apache.nifi.components.PropertyDescriptorprivate FtpServerstatic final org.apache.nifi.components.PropertyDescriptorstatic final org.apache.nifi.components.PropertyDescriptorprivate static final List<org.apache.nifi.components.PropertyDescriptor> static final org.apache.nifi.processor.Relationshipprivate static final Set<org.apache.nifi.processor.Relationship> private final AtomicReference<org.apache.nifi.processor.ProcessSessionFactory> private CountDownLatchstatic final org.apache.nifi.components.PropertyDescriptorstatic final org.apache.nifi.components.PropertyDescriptor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate org.apache.nifi.components.ValidationResultcreateValidationResult(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> voidmigrateProperties(PropertyConfiguration propertyConfiguration) voidonTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSessionFactory sessionFactory) voidstartFtpServer(org.apache.nifi.processor.ProcessContext context) voidprivate org.apache.nifi.components.ValidationResultusernameOrPasswordIsNull(org.apache.nifi.components.PropertyDescriptor nullProperty) private voidvalidateBindAddress(org.apache.nifi.components.ValidationContext context, Collection<org.apache.nifi.components.ValidationResult> validationResults) private voidvalidateUsernameAndPassword(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, updateScheduledTrueMethods inherited from class org.apache.nifi.components.AbstractConfigurableComponent
equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.nifi.components.ConfigurableComponent
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateMethods 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
-
RELATIONSHIP_SUCCESS
public static final org.apache.nifi.processor.Relationship RELATIONSHIP_SUCCESS -
RELATIONSHIPS
-
ftpServer
-
sessionFactorySetSignal
-
sessionFactory
-
-
Constructor Details
-
ListenFTP
public ListenFTP()
-
-
Method Details
-
migrateProperties
-
getSupportedPropertyDescriptors
- Overrides:
getSupportedPropertyDescriptorsin classorg.apache.nifi.components.AbstractConfigurableComponent
-
getRelationships
- Specified by:
getRelationshipsin interfaceorg.apache.nifi.processor.Processor- Overrides:
getRelationshipsin classorg.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:
customValidatein classorg.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
-