public abstract class EventProcessor extends Object
| Constructor and Description |
|---|
EventProcessor() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
This method closes the event processor.
|
boolean |
getAsynchronous()
This method indicates whether an asynchronous results listener will be required
for this event processor.
|
Map<String,Object> |
getParameters()
This method returns the map of names to parameters.
|
protected ResultHandler |
getResultHandler()
This method returns the result handler.
|
Map<String,Service> |
getServices()
This method returns the map of names to services.
|
void |
init()
This method initializes the event processor.
|
abstract Serializable |
process(String source,
Serializable event,
int retriesLeft)
This method processes the supplied event, and optionally
returns a transformed representation to be forwarded to
other processors.
|
void |
setAsynchronous(boolean async)
This method sets whether an asynchronous results listener will be required
for this event processor.
|
void |
setParameters(Map<String,Object> parameters)
This method sets the map of names to parameters.
|
void |
setResultHandler(ResultHandler handler)
This method sets the result handler, informed of a result if the event
processor is operating in an asynchronous mode.
|
void |
setServices(Map<String,Service> services)
This method sets the map of names to services.
|
public Map<String,Service> getServices()
public void setServices(Map<String,Service> services)
services - The servicespublic Map<String,Object> getParameters()
public void setParameters(Map<String,Object> parameters)
parameters - The parameterspublic boolean getAsynchronous()
public void setAsynchronous(boolean async)
async - Whether the event processor works asynchronously
NOTE: This mechanism is experimental, so may change in the future.public void setResultHandler(ResultHandler handler)
handler - The result handler
NOTE: This mechanism is experimental, so may change in the future.protected ResultHandler getResultHandler()
public void init()
throws Exception
Exception - Failed to initializepublic abstract Serializable process(String source, Serializable event, int retriesLeft) throws Exception
If the event cannot be processed at this time, then an exception should be thrown to initiate a retry. The number of remaining retries is supplied, to enable the processor to take appropriate error reporting action.
source - The source event processor name that generated the eventevent - The event to processretriesLeft - The number of retries leftException - Failed to process event, requesting retryCopyright © 2013-2015 JBoss by Red Hat. All Rights Reserved.