@CapabilityDescription(value="The PutUDP processor receives a FlowFile and packages the FlowFile content into a single UDP datagram packet which is then transmitted to the configured UDP server. The user must ensure that the FlowFile content being fed to this processor is not larger than the maximum size for the underlying UDP transport. The maximum transport size will vary based on the platform setup but is generally just under 64KB. FlowFiles will be marked as failed if their content is larger than the maximum transport size.") @InputRequirement(value=INPUT_REQUIRED) @SeeAlso(value=ListenUDP.class) @Tags(value={"remote","egress","put","udp"}) @TriggerWhenEmpty public class PutUDP extends AbstractPutEventProcessor
The PutUDP processor receives a FlowFile and packages the FlowFile content into a single UDP datagram packet which is then transmitted to the configured UDP server. The user must ensure that the FlowFile content being fed to this processor is not larger than the maximum size for the underlying UDP transport. The maximum transport size will vary based on the platform setup but is generally just under 64KB. FlowFiles will be marked as failed if their content is larger than the maximum transport size.
This processor has the following required properties:
This processor has the following optional properties:
The following relationships are required:
AbstractPutEventProcessor.FlowFileMessageBatch, AbstractPutEventProcessor.PruneResult, AbstractPutEventProcessor.Range
activeBatches, CHARSET, completeBatches, CONNECTION_PER_FLOWFILE, HOSTNAME, IDLE_EXPIRATION, MAX_SOCKET_SEND_BUFFER_SIZE, MESSAGE_DELIMITER, OUTGOING_MESSAGE_DELIMITER, PORT, PROTOCOL, REL_FAILURE, REL_SUCCESS, senderPool, SSL_CONTEXT_SERVICE, TCP_VALUE, TIMEOUT, transitUri, UDP_VALUE
Constructor and Description |
---|
PutUDP() |
Modifier and Type | Method and Description |
---|---|
protected ChannelSender |
createSender(ProcessContext context)
Creates a concrete instance of a ChannelSender object to use for sending UDP datagrams.
|
protected String |
createTransitUri(ProcessContext context)
Creates a Universal Resource Identifier (URI) for this processor.
|
protected void |
onFailure(ProcessContext context,
ProcessSession session,
FlowFile flowFile)
event handler method to perform the required actions when a failure has occurred.
|
void |
onTrigger(ProcessContext context,
ProcessSessionFactory sessionFactory)
event handler method to handle the FlowFile being forwarded to the Processor by the framework.
|
protected byte[] |
readContent(ProcessSession session,
FlowFile flowFile)
Helper method to read the FlowFile content stream into a byte array.
|
acquireSender, closeSenders, createSender, getAdditionalProperties, getAdditionalRelationships, getOutgoingMessageDelimiter, getRelationships, getSupportedPropertyDescriptors, init, onScheduled, pruneIdleSenders, relinquishSender
getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, 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
protected ChannelSender createSender(ProcessContext context) throws IOException
createSender
in class AbstractPutEventProcessor
context
- - the current process context.IOException
protected String createTransitUri(ProcessContext context)
createTransitUri
in class AbstractPutEventProcessor
context
- - the current process context.public void onTrigger(ProcessContext context, ProcessSessionFactory sessionFactory) throws ProcessException
context
- - the current process context.sessionFactory
- - a factory object to obtain a process session.ProcessException
protected void onFailure(ProcessContext context, ProcessSession session, FlowFile flowFile)
context
- - the current process context.session
- - the current process session.flowFile
- - the FlowFile that has failed to have been processed.protected byte[] readContent(ProcessSession session, FlowFile flowFile)
session
- - the current process session.flowFile
- - the FlowFile to read the content from.Copyright © 2020 Apache NiFi Project. All rights reserved.