public abstract class FetchFileTransfer extends AbstractProcessor
Modifier and Type | Class and Description |
---|---|
private static class |
FetchFileTransfer.FileTransferIdleWrapper
Wrapper around a FileTransfer object that is used to know when the FileTransfer was last used, so that
we have the ability to close connections that are "idle," or unused for some period of time.
|
Constructor and Description |
---|
FetchFileTransfer() |
Modifier and Type | Method and Description |
---|---|
void |
cleanup() |
private void |
closeConnections(boolean closeNonIdleConnections)
Close connections that are idle or optionally close all connections.
|
protected abstract FileTransfer |
createFileTransfer(ProcessContext context)
Creates a new instance of a FileTransfer that can be used to pull files from a remote system.
|
Set<Relationship> |
getRelationships() |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
void |
onScheduled(ProcessContext context) |
void |
onTrigger(ProcessContext context,
ProcessSession session) |
onTrigger
getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrue
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate
static final AllowableValue COMPLETION_NONE
static final AllowableValue COMPLETION_MOVE
static final AllowableValue COMPLETION_DELETE
static final PropertyDescriptor HOSTNAME
static final PropertyDescriptor UNDEFAULTED_PORT
public static final PropertyDescriptor USERNAME
public static final PropertyDescriptor REMOTE_FILENAME
static final PropertyDescriptor COMPLETION_STRATEGY
static final PropertyDescriptor MOVE_CREATE_DIRECTORY
static final PropertyDescriptor MOVE_DESTINATION_DIR
static final PropertyDescriptor FILE_NOT_FOUND_LOG_LEVEL
public static final Relationship REL_SUCCESS
static final Relationship REL_COMMS_FAILURE
static final Relationship REL_NOT_FOUND
static final Relationship REL_PERMISSION_DENIED
private final Map<Tuple<String,Integer>,BlockingQueue<FetchFileTransfer.FileTransferIdleWrapper>> fileTransferMap
private final long IDLE_CONNECTION_MILLIS
private volatile long lastClearTime
private LogLevel levelFileNotFound
public Set<Relationship> getRelationships()
getRelationships
in interface Processor
getRelationships
in class AbstractSessionFactoryProcessor
@OnScheduled public void onScheduled(ProcessContext context)
private void closeConnections(boolean closeNonIdleConnections)
closeNonIdleConnections
- if true
will close all connection; if false
will close only idle connections@OnStopped public void cleanup()
protected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors
in class AbstractConfigurableComponent
public void onTrigger(ProcessContext context, ProcessSession session) throws ProcessException
onTrigger
in class AbstractProcessor
ProcessException
protected abstract FileTransfer createFileTransfer(ProcessContext context)
context
- the ProcessContext to use in order to obtain configured propertiesCopyright © 2020 Apache NiFi Project. All rights reserved.