public class Engine extends Object
Flow for every message from the MessageBroker - usually several in parallel.| Constructor | Description |
|---|---|
Engine(MessageBroker messageBroker,
Flow flow) |
Creates a new Engine instance with concurrent workers.
|
Engine(MessageBroker messageBroker,
Flow flow,
int concurrentWorkers) |
Creates a new Engine instance with a fixed number of concurrent workers.
|
Engine(MessageBroker messageBroker,
Flow flow,
int concurrentWorkers,
ProcessReport processReport) |
Creates a new Engine instance with a fixed number of concurrent workers.
|
Engine(MessageBroker messageBroker,
Flow flow,
ProcessReport processReport) |
Creates a new Engine instance with a customized process report.
|
| Modifier and Type | Method | Description |
|---|---|---|
EngineStats |
getStats() |
|
void |
start() |
Starts processing messages until
stop() is called. |
void |
stop() |
Stops processing new messages or waiting for new messages to arrive.
|
public Engine(MessageBroker messageBroker, Flow flow) throws IOException
messageBroker - the message broker to get messages from or send messages toflow - the flow to execute agains every messageIOException - if reading/writing to the message broker failspublic Engine(MessageBroker messageBroker, Flow flow, int concurrentWorkers) throws IOException
messageBroker - the message broker to get messages from or send messages toflow - the flow to execute agains every messageconcurrentWorkers - the number of concurrent workersIOException - if reading/writing to the message broker failspublic Engine(MessageBroker messageBroker, Flow flow, ProcessReport processReport) throws IOException
messageBroker - the message broker to get messages from or send messages toflow - the flow to execute agains every messageprocessReport - Reporting implementationIOException - if reading/writing to the message broker failspublic Engine(MessageBroker messageBroker, Flow flow, int concurrentWorkers, ProcessReport processReport) throws IOException
messageBroker - the message broker to get messages from or send messages toflow - the flow to execute agains every messageconcurrentWorkers - the number of concurrent workersprocessReport - Reporting implementation (or null, if DefaultProcessReport shall be used)IOException - if reading/writing to the message broker failspublic void start()
stop() is called. If there are no
messages in the input queue, the engine waits for new messages to arrive.public void stop()
public EngineStats getStats()
Copyright © 2018. All rights reserved.