public class ChannelProcessor extends Object implements Configurable
Event
s into
Channel
s. These operations will propagate a ChannelException
if any errors occur while attempting to write to required
channels.
Each channel processor instance is configured with a ChannelSelector
instance that specifies which channels are
required and which
channels are
optional.
Constructor and Description |
---|
ChannelProcessor(ChannelSelector selector) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
configure(Context context)
The Context of the associated Source is passed.
|
ChannelSelector |
getSelector() |
void |
initialize() |
void |
processEvent(Event event)
Attempts to put the given event into each
configured channel.
|
void |
processEventBatch(List<Event> events)
Attempts to put the given events into each
configured channel.
|
public ChannelProcessor(ChannelSelector selector)
public void initialize()
public void close()
public void configure(Context context)
configure
in interface Configurable
context
- public ChannelSelector getSelector()
public void processEventBatch(List<Event> events)
required
channel throws a
ChannelException
, that exception will be propagated.
Note that if multiple channels are configured, some Transaction
s
may have already been committed while others may be rolled back in the
case of an exception.
events
- A list of events to put into the configured channels.ChannelException
- when a write to a required channel fails.public void processEvent(Event event)
required
channel throws a
ChannelException
, that exception will be propagated.
Note that if multiple channels are configured, some Transaction
s
may have already been committed while others may be rolled back in the
case of an exception.
event
- The event to put into the configured channels.ChannelException
- when a write to a required channel fails.Copyright © 2009–2019 Apache Software Foundation. All rights reserved.