public static class FrontEndApiHandler.Builder extends Object
| Modifier and Type | Field and Description |
|---|---|
protected PlatformController |
controller |
protected static String |
CONTROLLER_MISSING_ERROR |
protected org.hobbit.core.rabbit.RabbitQueueFactory |
factory |
protected int |
maxParallelProcessedMsgs |
protected org.hobbit.core.data.RabbitQueue |
queue |
protected static String |
QUEUE_INFO_MISSING_ERROR |
protected String |
queueName |
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
FrontEndApiHandler |
build()
Builds the
DataReceiverImpl instance with the previously given
information. |
FrontEndApiHandler.Builder |
maxParallelProcessedMsgs(int maxParallelProcessedMsgs)
Sets the maximum number of incoming messages that are processed in parallel.
|
FrontEndApiHandler.Builder |
platformController(PlatformController controller)
Sets the reference to the platform controller that is called if data is incoming.
|
FrontEndApiHandler.Builder |
queue(org.hobbit.core.data.RabbitQueue queue)
Sets the queue that is used to receive data.
|
FrontEndApiHandler.Builder |
queue(org.hobbit.core.rabbit.RabbitQueueFactory factory,
String queueName)
Method for providing the necessary information to create a queue if it has
not been provided with the
queue(RabbitQueue) method. |
protected static final String QUEUE_INFO_MISSING_ERROR
protected static final String CONTROLLER_MISSING_ERROR
protected PlatformController controller
protected org.hobbit.core.data.RabbitQueue queue
protected String queueName
protected int maxParallelProcessedMsgs
protected org.hobbit.core.rabbit.RabbitQueueFactory factory
public FrontEndApiHandler.Builder platformController(PlatformController controller)
controller - the platform controller that is called if data is incomingpublic FrontEndApiHandler.Builder queue(org.hobbit.core.data.RabbitQueue queue)
queue - the queue that is used to receive datapublic FrontEndApiHandler.Builder queue(org.hobbit.core.rabbit.RabbitQueueFactory factory, String queueName)
queue(RabbitQueue) method. Note that this
information is not used if a queue has been provided.factory - the queue factory used to create a queuequeueName - the name of the newly created queuepublic FrontEndApiHandler.Builder maxParallelProcessedMsgs(int maxParallelProcessedMsgs)
maxParallelProcessedMsgs - the maximum number of incoming messages that are processed in
parallelpublic FrontEndApiHandler build() throws IllegalStateException, IOException
DataReceiverImpl instance with the previously given
information.IllegalStateException - if the dataHandler is missing or if neither a queue nor the
information needed to create a queue have been provided.IOException - if an exception is thrown while creating a new queue or if the
given queue can not be configured by the newly created
DataReceiver. Note that in the latter case the queue will
be closed.Copyright © 2017–2018. All rights reserved.