public abstract class AbstractPutEventProcessor extends AbstractSessionFactoryProcessor
| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractPutEventProcessor.FlowFileMessageBatch
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 |
AbstractPutEventProcessor.PruneResult
The results from pruning connections.
|
protected static class |
AbstractPutEventProcessor.Range
Represents a range of messages from a FlowFile.
|
| Modifier and Type | Field and Description |
|---|---|
protected Set<AbstractPutEventProcessor.FlowFileMessageBatch> |
activeBatches |
static PropertyDescriptor |
CHARSET |
protected BlockingQueue<AbstractPutEventProcessor.FlowFileMessageBatch> |
completeBatches |
static PropertyDescriptor |
CONNECTION_PER_FLOWFILE |
private List<PropertyDescriptor> |
descriptors |
static PropertyDescriptor |
HOSTNAME |
static PropertyDescriptor |
IDLE_EXPIRATION |
static PropertyDescriptor |
MAX_SOCKET_SEND_BUFFER_SIZE |
static PropertyDescriptor |
MESSAGE_DELIMITER |
static PropertyDescriptor |
OUTGOING_MESSAGE_DELIMITER |
static PropertyDescriptor |
PORT |
static PropertyDescriptor |
PROTOCOL |
static Relationship |
REL_FAILURE |
static Relationship |
REL_SUCCESS |
private Set<Relationship> |
relationships |
protected BlockingQueue<ChannelSender> |
senderPool |
static PropertyDescriptor |
SSL_CONTEXT_SERVICE |
static AllowableValue |
TCP_VALUE |
static PropertyDescriptor |
TIMEOUT |
protected String |
transitUri |
static AllowableValue |
UDP_VALUE |
| Constructor and Description |
|---|
AbstractPutEventProcessor() |
| Modifier and Type | Method and Description |
|---|---|
protected ChannelSender |
acquireSender(ProcessContext context,
ProcessSession session,
FlowFile flowFile)
Helper method to acquire an available ChannelSender from the pool.
|
void |
closeSenders() |
protected abstract ChannelSender |
createSender(ProcessContext context)
Sub-classes create a ChannelSender given a context.
|
protected ChannelSender |
createSender(String protocol,
String host,
int port,
int timeout,
int maxSendBufferSize,
SSLContext sslContext)
Helper for sub-classes to create a sender.
|
protected abstract String |
createTransitUri(ProcessContext context)
Sub-classes construct a transit uri for provenance events.
|
protected List<PropertyDescriptor> |
getAdditionalProperties()
Override to provide additional properties for the processor.
|
protected List<Relationship> |
getAdditionalRelationships()
Override to provide additional relationships for the processor.
|
protected String |
getOutgoingMessageDelimiter(ProcessContext context,
FlowFile flowFile)
Gets the current value of the "Outgoing Message Delimiter" property and parses the special characters.
|
Set<Relationship> |
getRelationships() |
List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
protected void |
init(ProcessorInitializationContext context) |
void |
onScheduled(ProcessContext context) |
protected AbstractPutEventProcessor.PruneResult |
pruneIdleSenders(long idleThreshold)
Close any senders that haven't been active with in the given threshold
|
protected void |
relinquishSender(ChannelSender sender)
Helper method to relinquish the ChannelSender back to the pool.
|
getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTruecustomValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validatepublic static final PropertyDescriptor HOSTNAME
public static final PropertyDescriptor PORT
public static final PropertyDescriptor MAX_SOCKET_SEND_BUFFER_SIZE
public static final PropertyDescriptor IDLE_EXPIRATION
public static final AllowableValue TCP_VALUE
public static final AllowableValue UDP_VALUE
public static final PropertyDescriptor PROTOCOL
public static final PropertyDescriptor MESSAGE_DELIMITER
public static final PropertyDescriptor CHARSET
public static final PropertyDescriptor TIMEOUT
public static final PropertyDescriptor OUTGOING_MESSAGE_DELIMITER
public static final PropertyDescriptor CONNECTION_PER_FLOWFILE
public static final PropertyDescriptor SSL_CONTEXT_SERVICE
public static final Relationship REL_SUCCESS
public static final Relationship REL_FAILURE
private Set<Relationship> relationships
private List<PropertyDescriptor> descriptors
protected volatile String transitUri
protected volatile BlockingQueue<ChannelSender> senderPool
protected final BlockingQueue<AbstractPutEventProcessor.FlowFileMessageBatch> completeBatches
protected final Set<AbstractPutEventProcessor.FlowFileMessageBatch> activeBatches
protected void init(ProcessorInitializationContext context)
init in class AbstractSessionFactoryProcessorprotected List<Relationship> getAdditionalRelationships()
protected List<PropertyDescriptor> getAdditionalProperties()
public final Set<Relationship> getRelationships()
getRelationships in interface ProcessorgetRelationships in class AbstractSessionFactoryProcessorpublic final List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponent@OnScheduled public void onScheduled(ProcessContext context) throws IOException
IOException@OnStopped public void closeSenders()
protected abstract String createTransitUri(ProcessContext context)
context - the current contextprotected abstract ChannelSender createSender(ProcessContext context) throws IOException
context - the current contextIOException - if an error occurs creating the ChannelSenderprotected AbstractPutEventProcessor.PruneResult pruneIdleSenders(long idleThreshold)
idleThreshold - the threshold to consider a sender as idleprotected ChannelSender createSender(String protocol, String host, int port, int timeout, int maxSendBufferSize, SSLContext sslContext) throws IOException
protocol - the protocol for the senderhost - the host to send toport - the port to send totimeout - the timeout for connecting and communicating over the channelmaxSendBufferSize - the maximum size of the socket send buffersslContext - an SSLContext, or null if not using SSLIOException - if an error occurs creating the senderprotected ChannelSender acquireSender(ProcessContext context, ProcessSession session, FlowFile flowFile)
context - - the current process context.session - - the current process session.flowFile - - the FlowFile being processed in this session.protected void relinquishSender(ChannelSender sender)
sender - the sender to return or closeprotected String getOutgoingMessageDelimiter(ProcessContext context, FlowFile flowFile)
context - - the current process context.flowFile - - the FlowFile being processed.Copyright © 2019 Apache NiFi Project. All rights reserved.