public static class DataSenderImpl.Builder extends Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
deliveryMode |
protected RabbitQueueFactory |
factory |
protected int |
messageConfirmBuffer |
protected RabbitQueue |
queue |
protected static String |
QUEUE_INFO_MISSING_ERROR |
protected String |
queueName |
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
DataSenderImpl |
build()
Builds the
DataReceiverImpl instance with the previously
given information. |
DataSenderImpl.Builder |
deliveryMode(int deliveryMode)
Sets the delivery mode used for the RabbitMQ messages.
|
DataSenderImpl.Builder |
messageBuffer(int messageConfirmBuffer)
Sets the number of messages that are buffered while waiting for a
confirmation that they have been received by the broker.
|
DataSenderImpl.Builder |
queue(RabbitQueue queue)
Sets the queue that is used to receive data.
|
DataSenderImpl.Builder |
queue(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 RabbitQueue queue
protected String queueName
protected RabbitQueueFactory factory
protected int messageConfirmBuffer
protected int deliveryMode
public DataSenderImpl.Builder queue(RabbitQueue queue)
queue - the queue that is used to receive datapublic DataSenderImpl.Builder queue(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 DataSenderImpl.Builder messageBuffer(int messageConfirmBuffer)
Sets the number of messages that are buffered while waiting for a confirmation that they have been received by the broker. Note that if the message buffer has reached is maximum size, the sender will block until confirmations are received.
If the given message buffer size is <1 the usage of
confirmation messages is turned off.
messageConfirmBuffer - the size of the messages bufferpublic DataSenderImpl.Builder deliveryMode(int deliveryMode)
DataSenderImpl.DEFAULT_DELIVERY_MODE.deliveryMode - the delivery mode used for the RabbitMQ messagespublic DataSenderImpl build() throws IllegalStateException, IOException
DataReceiverImpl instance with the previously
given information.IllegalStateException - 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.Copyright © 2017–2018. All rights reserved.