Class RouteOnContent

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

@SideEffectFree @SupportsBatching @InputRequirement(INPUT_REQUIRED) @Tags({"route","content","regex","regular expression","regexp","find","text","string","search","filter","detect"}) @CapabilityDescription("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", expressionLanguageScope=FLOWFILE_ATTRIBUTES, description="Routes FlowFiles whose content matches the regular expression 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 org.apache.nifi.processor.AbstractProcessor
  • Field Summary

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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Set<org.apache.nifi.processor.Relationship>
     
    protected org.apache.nifi.components.PropertyDescriptor
     
    protected List<org.apache.nifi.components.PropertyDescriptor>
     
    void
    onPropertyModified(org.apache.nifi.components.PropertyDescriptor descriptor, String oldValue, String newValue)
     
    void
    onTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session)
     

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

    onTrigger

    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

    customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, hashCode, 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, validate

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

    isStateful, migrateProperties, migrateRelationships
  • Field Details

    • ROUTE_ATTRIBUTE_KEY

      public static final String ROUTE_ATTRIBUTE_KEY
      See Also:
    • MATCH_ALL

      public static final String MATCH_ALL
      See Also:
    • MATCH_SUBSEQUENCE

      public static final String MATCH_SUBSEQUENCE
      See Also:
    • BUFFER_SIZE

      public static final org.apache.nifi.components.PropertyDescriptor BUFFER_SIZE
    • MATCH_REQUIREMENT

      public static final org.apache.nifi.components.PropertyDescriptor MATCH_REQUIREMENT
    • CHARACTER_SET

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

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

      public static final org.apache.nifi.processor.Relationship REL_NO_MATCH
    • relationships

      private final AtomicReference<Set<org.apache.nifi.processor.Relationship>> relationships
  • Constructor Details

    • RouteOnContent

      public RouteOnContent()
  • Method Details

    • 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
    • getSupportedDynamicPropertyDescriptor

      protected org.apache.nifi.components.PropertyDescriptor getSupportedDynamicPropertyDescriptor(String propertyDescriptorName)
      Overrides:
      getSupportedDynamicPropertyDescriptor in class org.apache.nifi.components.AbstractConfigurableComponent
    • onPropertyModified

      public void onPropertyModified(org.apache.nifi.components.PropertyDescriptor descriptor, String oldValue, String newValue)
      Specified by:
      onPropertyModified in interface org.apache.nifi.components.ConfigurableComponent
      Overrides:
      onPropertyModified in class org.apache.nifi.components.AbstractConfigurableComponent
    • onTrigger

      public void onTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session)
      Specified by:
      onTrigger in class org.apache.nifi.processor.AbstractProcessor