E - the type of events being producedpublic abstract class AbstractListenEventProcessor<E extends Event> extends AbstractProcessor
| Modifier and Type | Field and Description |
|---|---|
protected Charset |
charset |
static PropertyDescriptor |
CHARSET |
protected List<PropertyDescriptor> |
descriptors |
protected ChannelDispatcher |
dispatcher |
protected BlockingQueue<E> |
errorEvents |
protected BlockingQueue<E> |
events |
static PropertyDescriptor |
MAX_CONNECTIONS |
static PropertyDescriptor |
MAX_MESSAGE_QUEUE_SIZE |
static PropertyDescriptor |
MAX_SOCKET_BUFFER_SIZE |
static int |
POLL_TIMEOUT_MS |
protected int |
port |
static PropertyDescriptor |
PORT |
static PropertyDescriptor |
RECV_BUFFER_SIZE |
static Relationship |
REL_SUCCESS |
protected Set<Relationship> |
relationships |
| Constructor and Description |
|---|
AbstractListenEventProcessor() |
| Modifier and Type | Method and Description |
|---|---|
protected BlockingQueue<ByteBuffer> |
createBufferPool(int poolSize,
int bufferSize)
Creates a pool of ByteBuffers with the given size.
|
protected abstract ChannelDispatcher |
createDispatcher(ProcessContext context,
BlockingQueue<E> 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.
|
int |
getDispatcherPort() |
int |
getErrorQueueSize() |
protected long |
getLongPollTimeout() |
protected E |
getMessage(boolean longPoll,
boolean pollErrorQueue,
ProcessSession session)
If pollErrorQueue is true, the error queue will be checked first and event will be
returned from the error queue if available.
|
int |
getQueueSize() |
Set<Relationship> |
getRelationships() |
List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
protected void |
init(ProcessorInitializationContext context) |
void |
onScheduled(ProcessContext context) |
void |
onUnscheduled() |
onTrigger, onTriggergetControllerServiceLookup, 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 PORT
public static final PropertyDescriptor CHARSET
public static final PropertyDescriptor RECV_BUFFER_SIZE
public static final PropertyDescriptor MAX_SOCKET_BUFFER_SIZE
public static final PropertyDescriptor MAX_MESSAGE_QUEUE_SIZE
public static final PropertyDescriptor MAX_CONNECTIONS
public static final Relationship REL_SUCCESS
public static final int POLL_TIMEOUT_MS
protected Set<Relationship> relationships
protected List<PropertyDescriptor> descriptors
protected volatile int port
protected volatile Charset charset
protected volatile ChannelDispatcher dispatcher
protected volatile BlockingQueue<E extends Event> events
protected volatile BlockingQueue<E extends Event> errorEvents
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
IOExceptionprotected abstract ChannelDispatcher createDispatcher(ProcessContext context, BlockingQueue<E> events) throws IOException
context - the ProcessContext to retrieve property values fromIOException - if unable to listen on the requested portpublic final int getDispatcherPort()
public int getErrorQueueSize()
public int getQueueSize()
@OnUnscheduled public void onUnscheduled()
protected BlockingQueue<ByteBuffer> createBufferPool(int poolSize, int bufferSize)
poolSize - the number of buffers to initialize the pool withbufferSize - the size of each bufferprotected E getMessage(boolean longPoll, boolean pollErrorQueue, ProcessSession session)
longPoll - whether or not to poll the main queue with a small timeoutpollErrorQueue - whether or not to poll the error queue firstprotected long getLongPollTimeout()
Copyright © 2019 Apache NiFi Project. All rights reserved.