public class RMQConnection extends Object implements io.dropwizard.lifecycle.Managed
| Constructor and Description |
|---|
RMQConnection(String name,
RMQConfig config,
ExecutorService executorService,
io.dropwizard.setup.Environment environment) |
| Modifier and Type | Method and Description |
|---|---|
com.rabbitmq.client.Channel |
channel() |
void |
ensure(String queueName,
String exchange) |
void |
ensure(String queueName,
String exchange,
Map<String,Object> rmqOpts) |
void |
ensure(String queueName,
String routingQueue,
String exchange) |
void |
ensure(String queueName,
String routingQueue,
String exchange,
Map<String,Object> rmqOpts) |
com.codahale.metrics.health.HealthCheck |
healthcheck() |
com.rabbitmq.client.Channel |
newChannel() |
Map<String,Object> |
rmqOpts() |
Map<String,Object> |
rmqOpts(String deadLetterExchange) |
void |
start() |
void |
stop() |
public RMQConnection(String name, RMQConfig config, ExecutorService executorService, io.dropwizard.setup.Environment environment)
public void start()
throws Exception
start in interface io.dropwizard.lifecycle.ManagedExceptionpublic void ensure(String queueName, String exchange, Map<String,Object> rmqOpts) throws Exception
Exceptionpublic void ensure(String queueName, String routingQueue, String exchange) throws Exception
Exceptionpublic void ensure(String queueName, String routingQueue, String exchange, Map<String,Object> rmqOpts) throws Exception
Exceptionpublic com.codahale.metrics.health.HealthCheck healthcheck()
public void stop()
throws Exception
stop in interface io.dropwizard.lifecycle.ManagedExceptionpublic com.rabbitmq.client.Channel channel()
throws IOException
IOExceptionpublic com.rabbitmq.client.Channel newChannel()
throws IOException
IOExceptionCopyright © 2016–2020. All rights reserved.