Class AbstractPutEventProcessor<T>

java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.processor.AbstractSessionFactoryProcessor
org.apache.nifi.processor.util.put.AbstractPutEventProcessor<T>
All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent, org.apache.nifi.processor.Processor

public abstract class AbstractPutEventProcessor<T> extends org.apache.nifi.processor.AbstractSessionFactoryProcessor
A base class for processors that send data to an external system using TCP or UDP.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected class 
    A wrapper to hold the ranges of a FlowFile that were successful and ranges that failed, and then transfer those ranges appropriately.
    protected static class 
    Represents a range of messages from a FlowFile.
  • Field Summary

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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected String
    createTransitUri(org.apache.nifi.processor.ProcessContext context)
     
    protected List<org.apache.nifi.components.PropertyDescriptor>
    Override to provide additional properties for the processor.
    protected List<org.apache.nifi.processor.Relationship>
    Override to provide additional relationships for the processor.
    protected EventSender<T>
    getEventSender(org.apache.nifi.processor.ProcessContext context)
     
    protected abstract NettyEventSenderFactory<T>
    getNettyEventSenderFactory(String hostname, int port, String protocol)
     
    protected String
    getOutgoingMessageDelimiter(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.flowfile.FlowFile flowFile)
    Gets the current value of the "Outgoing Message Delimiter" property and parses the special characters.
    protected String
    getProtocol(org.apache.nifi.processor.ProcessContext context)
     
    final Set<org.apache.nifi.processor.Relationship>
     
    final List<org.apache.nifi.components.PropertyDescriptor>
     
    protected void
    init(org.apache.nifi.processor.ProcessorInitializationContext context)
     
    void
    onScheduled(org.apache.nifi.processor.ProcessContext context)
     

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

    getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrue

    Methods inherited from class org.apache.nifi.components.AbstractConfigurableComponent

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

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

    isStateful, migrateProperties, migrateRelationships, onTrigger
  • Field Details

    • HOSTNAME

      public static final org.apache.nifi.components.PropertyDescriptor HOSTNAME
    • PORT

      public static final org.apache.nifi.components.PropertyDescriptor PORT
    • MAX_SOCKET_SEND_BUFFER_SIZE

      public static final org.apache.nifi.components.PropertyDescriptor MAX_SOCKET_SEND_BUFFER_SIZE
    • IDLE_EXPIRATION

      public static final org.apache.nifi.components.PropertyDescriptor IDLE_EXPIRATION
    • TCP_VALUE

      public static final org.apache.nifi.components.AllowableValue TCP_VALUE
    • UDP_VALUE

      public static final org.apache.nifi.components.AllowableValue UDP_VALUE
    • PROTOCOL

      public static final org.apache.nifi.components.PropertyDescriptor PROTOCOL
    • MESSAGE_DELIMITER

      public static final org.apache.nifi.components.PropertyDescriptor MESSAGE_DELIMITER
    • CHARSET

      public static final org.apache.nifi.components.PropertyDescriptor CHARSET
    • TIMEOUT

      public static final org.apache.nifi.components.PropertyDescriptor TIMEOUT
    • OUTGOING_MESSAGE_DELIMITER

      public static final org.apache.nifi.components.PropertyDescriptor OUTGOING_MESSAGE_DELIMITER
    • CONNECTION_PER_FLOWFILE

      public static final org.apache.nifi.components.PropertyDescriptor CONNECTION_PER_FLOWFILE
    • SSL_CONTEXT_SERVICE

      public static final org.apache.nifi.components.PropertyDescriptor SSL_CONTEXT_SERVICE
    • REL_SUCCESS

      public static final org.apache.nifi.processor.Relationship REL_SUCCESS
    • REL_FAILURE

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

      private Set<org.apache.nifi.processor.Relationship> relationships
    • descriptors

      private List<org.apache.nifi.components.PropertyDescriptor> descriptors
    • transitUri

      protected volatile String transitUri
    • eventSender

      protected EventSender<T> eventSender
    • completeBatches

    • activeBatches

      protected final Set<AbstractPutEventProcessor<T>.FlowFileMessageBatch> activeBatches
  • Constructor Details

    • AbstractPutEventProcessor

      public AbstractPutEventProcessor()
  • Method Details

    • init

      protected void init(org.apache.nifi.processor.ProcessorInitializationContext context)
      Overrides:
      init in class org.apache.nifi.processor.AbstractSessionFactoryProcessor
    • getAdditionalRelationships

      protected List<org.apache.nifi.processor.Relationship> getAdditionalRelationships()
      Override to provide additional relationships for the processor.
      Returns:
      a list of relationships
    • getAdditionalProperties

      protected List<org.apache.nifi.components.PropertyDescriptor> getAdditionalProperties()
      Override to provide additional properties for the processor.
      Returns:
      a list of properties
    • getRelationships

      public final 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
    • getSupportedPropertyDescriptors

      public final List<org.apache.nifi.components.PropertyDescriptor> getSupportedPropertyDescriptors()
      Overrides:
      getSupportedPropertyDescriptors in class org.apache.nifi.components.AbstractConfigurableComponent
    • onScheduled

      @OnScheduled public void onScheduled(org.apache.nifi.processor.ProcessContext context) throws IOException
      Throws:
      IOException
    • closeSenders

      @OnStopped public void closeSenders() throws Exception
      Throws:
      Exception
    • createTransitUri

      protected String createTransitUri(org.apache.nifi.processor.ProcessContext context)
    • getEventSender

      protected EventSender<T> getEventSender(org.apache.nifi.processor.ProcessContext context)
    • getOutgoingMessageDelimiter

      protected String getOutgoingMessageDelimiter(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.flowfile.FlowFile flowFile)
      Gets the current value of the "Outgoing Message Delimiter" property and parses the special characters.
      Parameters:
      context - - the current process context.
      flowFile - - the FlowFile being processed.
      Returns:
      String containing the Delimiter value.
    • getProtocol

      protected String getProtocol(org.apache.nifi.processor.ProcessContext context)
    • getNettyEventSenderFactory

      protected abstract NettyEventSenderFactory<T> getNettyEventSenderFactory(String hostname, int port, String protocol)