public class AmqpAcquisition extends Object implements AcquisitionDaemon
Modifier and Type | Class and Description |
---|---|
private class |
AmqpAcquisition.AmqpConsumer |
private static class |
AmqpAcquisition.ConnectionUpdater
Daemon used to periodically update the pool of connections known by the
acquisition destinations.
|
Modifier and Type | Field and Description |
---|---|
private String |
amqpQueue
The name of the foreign AMQP queue.
|
private boolean |
amqpQueueAutoDelete |
private boolean |
amqpQueueDurable |
private boolean |
amqpQueueExclusive |
private boolean |
amqpQueuePassive |
private Map<String,com.rabbitmq.client.Channel> |
channels |
private boolean |
closing |
private List<String> |
connectionNames
If routing prop has been set, it defines a list of connection to use.
|
private static AmqpAcquisition.ConnectionUpdater |
connectionUpdater |
private static org.objectweb.util.monolog.api.Logger |
logger |
private static String |
QUEUE_AUTODELETE_PROP
True if we are declaring an autodelete queue (server will delete it when no longer in use).
|
private static String |
QUEUE_DURABLE_PROP
True if we are declaring a durable queue (the queue will survive a server restart).
|
private static String |
QUEUE_EXCLUSIVE_PROP
True if we are declaring an exclusive queue (restricted to this connection).
|
private static String |
QUEUE_NAME_PROP
the name of the queue to declare
|
private static String |
QUEUE_PASSIVE_PROP
True if we are declaring a queue passively; i.e., check if it exists.
|
private static String |
ROUTING_PROP |
private ReliableTransmitter |
transmitter |
private static String |
UPDATE_PERIOD_PROP |
Constructor and Description |
---|
AmqpAcquisition() |
Modifier and Type | Method and Description |
---|---|
void |
start(Properties properties,
ReliableTransmitter transmitter)
Tells the daemon to start with the given properties.
|
void |
stop()
Tells the daemon to stop.
|
void |
updateConnections(List<LiveServerConnection> connections)
Create a new AMQP consumer for each connection available.
|
private static final org.objectweb.util.monolog.api.Logger logger
private static final String QUEUE_NAME_PROP
private static final String QUEUE_PASSIVE_PROP
private static final String QUEUE_EXCLUSIVE_PROP
private static final String QUEUE_DURABLE_PROP
private static final String QUEUE_AUTODELETE_PROP
private static final String UPDATE_PERIOD_PROP
private static final String ROUTING_PROP
private static AmqpAcquisition.ConnectionUpdater connectionUpdater
private ReliableTransmitter transmitter
private List<String> connectionNames
private String amqpQueue
private boolean amqpQueuePassive
private boolean amqpQueueExclusive
private boolean amqpQueueDurable
private boolean amqpQueueAutoDelete
private volatile boolean closing
public void start(Properties properties, ReliableTransmitter transmitter)
AcquisitionDaemon
start
in interface AcquisitionDaemon
properties
- The initial set of properties.transmitter
- a transmitter used to transmit retrieved messages to the MOM
reliably.public void stop()
AcquisitionDaemon
stop
in interface AcquisitionDaemon
public void updateConnections(List<LiveServerConnection> connections)
Copyright © 2013 ScalAgent D.T.. All Rights Reserved.