Closeable, AutoCloseable, ComponentAbstractCommandReceivingComponentpublic abstract class AbstractComponent extends Object implements Component
| Modifier and Type | Field | Description |
|---|---|---|
protected com.rabbitmq.client.ConnectionFactory |
connectionFactory |
The factory that can be used to create additional connections.
|
private String |
hobbitSessionId |
|
protected RabbitQueueFactory |
incomingDataQueueFactory |
Factory for creating outgoing data queues.
|
private static org.slf4j.Logger |
LOGGER |
|
static int |
NUMBER_OF_RETRIES_TO_CONNECT_TO_RABBIT_MQ |
Maximum number of retries that are executed to connect to RabbitMQ.
|
protected RabbitQueueFactory |
outgoingDataQueuefactory |
Factory for creating outgoing data queues.
|
protected String |
rabbitMQHostName |
The host name of the RabbitMQ broker.
|
static long |
START_WAITING_TIME_BEFORE_RETRY |
Time, the system waits before retrying to connect to RabbitMQ.
|
| Constructor | Description |
|---|---|
AbstractComponent() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
protected com.rabbitmq.client.Connection |
createConnection() |
|
String |
generateSessionQueueName(String queueName) |
|
String |
getHobbitSessionId() |
|
void |
init() |
This method initializes the component.
|
private static final org.slf4j.Logger LOGGER
public static final int NUMBER_OF_RETRIES_TO_CONNECT_TO_RABBIT_MQ
public static final long START_WAITING_TIME_BEFORE_RETRY
private String hobbitSessionId
protected RabbitQueueFactory outgoingDataQueuefactory
protected RabbitQueueFactory incomingDataQueueFactory
protected String rabbitMQHostName
protected com.rabbitmq.client.ConnectionFactory connectionFactory
incomingDataQueueFactory and
outgoingDataQueuefactory objects.public void init()
throws Exception
Componentprotected com.rabbitmq.client.Connection createConnection()
throws Exception
Exceptionpublic void close()
throws IOException
close in interface AutoCloseableclose in interface CloseableIOExceptionpublic String getHobbitSessionId()
Copyright © 2017. All rights reserved.