@EventDriven @SideEffectFree @SupportsBatching @InputRequirement(value=INPUT_REQUIRED) @Tags(value={"route","content","regex","regular expression","regexp"}) @CapabilityDescription(value="Applies Regular Expressions to the content of a FlowFile and routes a copy of the FlowFile to each destination whose Regular Expression matches. Regular Expressions are added as User-Defined Properties where the name of the property is the name of the relationship and the value is a Regular Expression to match against the FlowFile content. User-Defined properties do support the Attribute Expression Language, but the results are interpreted as literal values, not Regular Expressions") @DynamicProperty(name="Relationship Name", value="A Regular Expression", supportsExpressionLanguage=true, description="Routes FlowFiles whose content matches the regular expressoin defined by Dynamic Property\'s value to the Relationship defined by the Dynamic Property\'s key") @DynamicRelationship(name="Name from Dynamic Property", description="FlowFiles that match the Dynamic Property\'s Regular Expression") public class RouteOnContent extends AbstractProcessor
Modifier and Type | Field and Description |
---|---|
static PropertyDescriptor |
BUFFER_SIZE |
static PropertyDescriptor |
CHARACTER_SET |
static String |
MATCH_ALL |
static PropertyDescriptor |
MATCH_REQUIREMENT |
static String |
MATCH_SUBSEQUENCE |
private List<PropertyDescriptor> |
properties |
static Relationship |
REL_NO_MATCH |
private AtomicReference<Set<Relationship>> |
relationships |
static String |
ROUTE_ATTRIBUTE_KEY |
Constructor and Description |
---|
RouteOnContent() |
Modifier and Type | Method and Description |
---|---|
Set<Relationship> |
getRelationships() |
protected PropertyDescriptor |
getSupportedDynamicPropertyDescriptor(String propertyDescriptorName) |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
protected void |
init(ProcessorInitializationContext context) |
void |
onPropertyModified(PropertyDescriptor descriptor,
String oldValue,
String newValue) |
void |
onTrigger(ProcessContext context,
ProcessSession session) |
onTrigger
getControllerServiceLookup, getIdentifier, getLogger, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrue
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, hashCode, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getPropertyDescriptor, getPropertyDescriptors, validate
public static final String ROUTE_ATTRIBUTE_KEY
public static final String MATCH_ALL
public static final String MATCH_SUBSEQUENCE
public static final PropertyDescriptor BUFFER_SIZE
public static final PropertyDescriptor MATCH_REQUIREMENT
public static final PropertyDescriptor CHARACTER_SET
public static final Relationship REL_NO_MATCH
private final AtomicReference<Set<Relationship>> relationships
private List<PropertyDescriptor> properties
protected void init(ProcessorInitializationContext context)
init
in class AbstractSessionFactoryProcessor
protected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors
in class AbstractConfigurableComponent
public Set<Relationship> getRelationships()
getRelationships
in interface Processor
getRelationships
in class AbstractSessionFactoryProcessor
protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(String propertyDescriptorName)
getSupportedDynamicPropertyDescriptor
in class AbstractConfigurableComponent
public void onPropertyModified(PropertyDescriptor descriptor, String oldValue, String newValue)
onPropertyModified
in interface ConfigurableComponent
onPropertyModified
in class AbstractConfigurableComponent
public void onTrigger(ProcessContext context, ProcessSession session)
onTrigger
in class AbstractProcessor
Copyright © 2017 Apache NiFi Project. All rights reserved.