public static final class PairedDataSender.Builder extends DataSenderImpl.Builder
deliveryMode, factory, idGenerator, messageConfirmBuffer, messageSize, name, queue, QUEUE_INFO_MISSING_ERROR, queueName| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
PairedDataSender |
build()
Builds the
DataReceiverImpl instance with the previously
given information. |
PairedDataSender.Builder |
deliveryMode(int deliveryMode)
Sets the delivery mode used for the RabbitMQ messages.
|
PairedDataSender.Builder |
idGenerator(IdGenerator idGenerator)
Sets the Id generator used to create unique stream Ids.
|
PairedDataSender.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.
|
PairedDataSender.Builder |
messageSize(int messageSize)
Sets the size of the messages that will be send.
|
PairedDataSender.Builder |
name(String name) |
PairedDataSender.Builder |
queue(RabbitQueue queue)
Sets the queue that is used to receive data.
|
PairedDataSender.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. |
public PairedDataSender.Builder idGenerator(IdGenerator idGenerator)
idGenerator in class DataSenderImpl.BuilderdataHandler - the Id generator used to create unique stream Idspublic PairedDataSender.Builder queue(RabbitQueue queue)
queue in class DataSenderImpl.Builderqueue - the queue that is used to receive datapublic PairedDataSender.Builder queue(RabbitQueueFactory factory, String queueName)
queue(RabbitQueue) method.
Note that this information is not used if a queue has been provided.queue in class DataSenderImpl.Builderfactory - the queue factory used to create a queuequeueName - the name of the newly created queuepublic PairedDataSender.Builder messageSize(int messageSize)
messageSize in class DataSenderImpl.BuildermessageSize - the size of the messages that will be sendpublic PairedDataSender.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.
messageBuffer in class DataSenderImpl.BuildermessageConfirmBuffer - the size of the messages bufferpublic PairedDataSender.Builder deliveryMode(int deliveryMode)
DataSenderImpl.DEFAULT_DELIVERY_MODE.deliveryMode in class DataSenderImpl.BuilderdeliveryMode - the delivery mode used for the RabbitMQ messagespublic PairedDataSender.Builder name(String name)
name in class DataSenderImpl.Builderpublic PairedDataSender build() throws IllegalStateException, IOException
DataReceiverImpl instance with the previously
given information.build in class DataSenderImpl.BuilderIllegalStateException - 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.