@InputRequirement(value=INPUT_FORBIDDEN) @Tags(value={"ingest","FTP","FTPS","listen"}) @CapabilityDescription(value="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 AbstractSessionFactoryProcessor
| Modifier and Type | Field and Description |
|---|---|
static PropertyDescriptor |
BIND_ADDRESS |
private FtpServer |
ftpServer |
static PropertyDescriptor |
PASSWORD |
static PropertyDescriptor |
PORT |
private static List<PropertyDescriptor> |
PROPERTIES |
static Relationship |
RELATIONSHIP_SUCCESS |
private static Set<Relationship> |
RELATIONSHIPS |
private AtomicReference<ProcessSessionFactory> |
sessionFactory |
private CountDownLatch |
sessionFactorySetSignal |
static PropertyDescriptor |
SSL_CONTEXT_SERVICE |
static PropertyDescriptor |
USERNAME |
| Constructor and Description |
|---|
ListenFTP() |
| Modifier and Type | Method and Description |
|---|---|
private ValidationResult |
createValidationResult(String subject,
String explanation) |
protected Collection<ValidationResult> |
customValidate(ValidationContext context) |
Set<Relationship> |
getRelationships() |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
void |
onTrigger(ProcessContext context,
ProcessSessionFactory sessionFactory) |
void |
startFtpServer(ProcessContext context) |
void |
stopFtpServer() |
private ValidationResult |
usernameOrPasswordIsNull(PropertyDescriptor nullProperty) |
private void |
validateBindAddress(ValidationContext context,
Collection<ValidationResult> validationResults) |
private void |
validateUsernameAndPassword(ValidationContext context,
Collection<ValidationResult> validationResults) |
getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrueequals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitisStatefulgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validatepublic static final PropertyDescriptor SSL_CONTEXT_SERVICE
public static final Relationship RELATIONSHIP_SUCCESS
public static final PropertyDescriptor BIND_ADDRESS
public static final PropertyDescriptor PORT
public static final PropertyDescriptor USERNAME
public static final PropertyDescriptor PASSWORD
private static final List<PropertyDescriptor> PROPERTIES
private static final Set<Relationship> RELATIONSHIPS
private volatile FtpServer ftpServer
private volatile CountDownLatch sessionFactorySetSignal
private final AtomicReference<ProcessSessionFactory> sessionFactory
protected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponentpublic Set<Relationship> getRelationships()
getRelationships in interface ProcessorgetRelationships in class AbstractSessionFactoryProcessor@OnScheduled public void startFtpServer(ProcessContext context)
@OnStopped public void stopFtpServer()
public void onTrigger(ProcessContext context, ProcessSessionFactory sessionFactory) throws ProcessException
ProcessExceptionprotected Collection<ValidationResult> customValidate(ValidationContext context)
customValidate in class AbstractConfigurableComponentprivate void validateUsernameAndPassword(ValidationContext context, Collection<ValidationResult> validationResults)
private void validateBindAddress(ValidationContext context, Collection<ValidationResult> validationResults)
private ValidationResult usernameOrPasswordIsNull(PropertyDescriptor nullProperty)
private ValidationResult createValidationResult(String subject, String explanation)
Copyright © 2023 Apache NiFi Project. All rights reserved.