public class Node extends Object
Constructor and Description |
---|
Node()
The default constructor for the event processor node.
|
Modifier and Type | Method and Description |
---|---|
protected void |
close()
This method closes the node.
|
protected void |
close(EPNContainer container)
Deprecated.
Use the alternative 'close' method without the container parameter
|
protected void |
forward(EPNContainer container,
EventList results)
Deprecated.
Use the alternative 'forward' method that does not require the container to be provided
|
protected void |
forward(EventList results)
This method forwards the results to any destinations that have been
defined.
|
protected List<Channel> |
getChannels()
This method returns the list of channels associated with this
node.
|
List<String> |
getDestinationSubjects()
This method returns the list of destination subjects.
|
EventProcessor |
getEventProcessor()
This method returns the event processor.
|
int |
getMaxRetries()
This method returns the maximum number of retries
for processing an event.
|
String |
getName()
This method returns the node name.
|
List<Notification> |
getNotifications()
This method returns the list of notifications.
|
Predicate |
getPredicate()
This method returns the optional predicate that can be used
to filter the source events that should be processed.
|
long |
getRetryInterval()
This method returns the retry interval.
|
List<String> |
getSourceNodes()
This method returns the list of source nodes.
|
protected void |
init()
This method initializes the node.
|
protected EventList |
process(EPNContainer container,
String source,
EventList events,
int retriesLeft)
Deprecated.
The container should be associated with the node using the 'setContainer' method
|
protected EventList |
process(String source,
EventList events,
int retriesLeft)
This method processes the supplied list of events against the
event processor configured with the node, to determine
which transformed events should be forwarded, and which need
to be returned to be retried.
|
protected void |
setContainer(EPNContainer container)
This method sets the EPN container.
|
void |
setDestinationSubjects(List<String> destinations)
This method sets the list of destination subjects.
|
void |
setEventProcessor(EventProcessor ep)
This method sets the event processor.
|
void |
setMaxRetries(int max)
This method sets the maximum number of retries
for processing an event.
|
void |
setName(String name)
This method sets the node name.
|
void |
setNotifications(List<Notification> notifications)
This method sets the list of notifications.
|
void |
setPredicate(Predicate pred)
This method sets the optional predicate that can be used
to filter the source events that should be processed.
|
void |
setRetryInterval(long interval)
This method sets the retry interval.
|
void |
setSourceNodes(List<String> sources)
This method sets the list of sources.
|
public String getName()
public void setName(String name)
name
- The namepublic int getMaxRetries()
public void setMaxRetries(int max)
max
- The maximum number of eventspublic long getRetryInterval()
public void setRetryInterval(long interval)
interval
- The retry intervalpublic List<String> getSourceNodes()
public void setSourceNodes(List<String> sources)
sources
- The source nodespublic List<String> getDestinationSubjects()
public void setDestinationSubjects(List<String> destinations)
destinations
- The destination subjectspublic EventProcessor getEventProcessor()
public void setEventProcessor(EventProcessor ep)
ep
- The event processorpublic Predicate getPredicate()
public void setPredicate(Predicate pred)
pred
- The optional predicatepublic List<Notification> getNotifications()
public void setNotifications(List<Notification> notifications)
notifications
- The list of notificationsprotected List<Channel> getChannels()
protected void init() throws Exception
Exception
- Failed to initialize the nodeprotected void setContainer(EPNContainer container)
container
- The containerprotected EventList process(EPNContainer container, String source, EventList events, int retriesLeft) throws Exception
container
- The containersource
- The source node/subject that generated the eventevents
- The list of events to be processedretriesLeft
- The number of remaining retriesException
- Failed to process events, and should result in transaction rollbackprotected EventList process(String source, EventList events, int retriesLeft) throws Exception
source
- The source node/subject that generated the eventevents
- The list of events to be processedretriesLeft
- The number of remaining retriesException
- Failed to process events, and should result in transaction rollbackprotected void forward(EPNContainer container, EventList results) throws Exception
container
- The containerresults
- The resultsException
- Failed to forward resultsprotected void forward(EventList results) throws Exception
results
- The resultsException
- Failed to forward resultsprotected void close(EPNContainer container) throws Exception
container
- The containerException
- Failed to close the nodeCopyright © 2013-2015 JBoss by Red Hat. All Rights Reserved.