Package org.hobbit.core.rabbit
Interface RabbitQueueFactory
-
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
RabbitQueueFactoryImpl
public interface RabbitQueueFactory extends Closeable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description com.rabbitmq.client.ChannelcreateChannel()This method opens a channel using the established connection to RabbitMQ.RabbitQueuecreateDefaultRabbitQueue(String name)This method opens a channel using the established connection to RabbitMQ and creates a new queue using the given name and the following configuration: The channel number is automatically derived from the connection. The queue is not durable. The queue is not exclusive. The queue is configured to be deleted automatically. No additional queue configuration is defined.RabbitQueuecreateDefaultRabbitQueue(String name, com.rabbitmq.client.Channel channel)This method uses the given channel and creates a new queue using the given name and the following configuration: The queue is not durable. The queue is not exclusive. The queue is configured to be deleted automatically. No additional queue configuration is defined.com.rabbitmq.client.ConnectiongetConnection()Returns theConnectionto the RabbitMQ broker used internally.
-
-
-
Method Detail
-
createDefaultRabbitQueue
RabbitQueue createDefaultRabbitQueue(String name) throws IOException
This method opens a channel using the established connection to RabbitMQ and creates a new queue using the given name and the following configuration:- The channel number is automatically derived from the connection.
- The queue is not durable.
- The queue is not exclusive.
- The queue is configured to be deleted automatically.
- No additional queue configuration is defined.
- Parameters:
name- name of the queue- Returns:
RabbitQueueobject comprising theChanneland the name of the created queue- Throws:
IOException- if a communication problem during the creation of the channel or the queue occurs
-
createDefaultRabbitQueue
RabbitQueue createDefaultRabbitQueue(String name, com.rabbitmq.client.Channel channel) throws IOException
This method uses the given channel and creates a new queue using the given name and the following configuration:- The queue is not durable.
- The queue is not exclusive.
- The queue is configured to be deleted automatically.
- No additional queue configuration is defined.
- Parameters:
name- name of the queuechannel- theChannelthat will be used to generate the queue- Returns:
RabbitQueueobject comprising theChanneland the name of the created queue- Throws:
IOException- if a communication problem during the creation of the channel or the queue occurs
-
createChannel
com.rabbitmq.client.Channel createChannel() throws IOExceptionThis method opens a channel using the established connection to RabbitMQ. The channel number is automatically derived from the connection.- Returns:
- the newly created
Channel - Throws:
IOException- if a communication problem during the creation of the channel
-
getConnection
com.rabbitmq.client.Connection getConnection()
Returns theConnectionto the RabbitMQ broker used internally.- Returns:
- the
Connectionto the RabbitMQ broker used internally
-
-