Package com.rabbitmq.client.amqp.impl
Class AmqpEnvironmentBuilder
java.lang.Object
com.rabbitmq.client.amqp.impl.AmqpEnvironmentBuilder
- All Implemented Interfaces:
EnvironmentBuilder
Builder to create an
Environment
instance of the RabbitMQ AMQP 1.0 Java Client.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Common settings for connections created by an environment instance. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Create the environment instance.Returns connection settings shared by connection builders.consumerExecutorService
(ExecutorService consumerExecutorService) Deprecated, for removal: This API element is subject to removal in a future version.Do not use anymoreexecutorService
(ExecutorService executorService) Set executor service used for internal tasks (e.g. connection recovery).metricsCollector
(MetricsCollector metricsCollector) Set up aMetricsCollector
.observationCollector
(ObservationCollector observationCollector) Set up anObservationCollector
.publisherExecutorService
(ExecutorService publisherExecutorService) Set executor service used to deal with broker responses after processing outbound messages.scheduledExecutorService
(ScheduledExecutorService scheduledExecutorService) Set scheduled executor service used for internal tasks (e.g. connection recovery).
-
Constructor Details
-
AmqpEnvironmentBuilder
public AmqpEnvironmentBuilder()
-
-
Method Details
-
executorService
Set executor service used for internal tasks (e.g. connection recovery).The library uses sensible defaults, override only in case of problems.
- Parameters:
executorService
- the executor service- Returns:
- this builder instance
-
scheduledExecutorService
public AmqpEnvironmentBuilder scheduledExecutorService(ScheduledExecutorService scheduledExecutorService) Set scheduled executor service used for internal tasks (e.g. connection recovery).The library uses sensible defaults, override only in case of problems.
- Parameters:
scheduledExecutorService
- the scheduled executor service- Returns:
- this builder instance
-
publisherExecutorService
Set executor service used to deal with broker responses after processing outbound messages.The library uses sensible defaults, override only in case of problems.
- Parameters:
publisherExecutorService
- the executor service- Returns:
- this builder instance
-
consumerExecutorService
@Deprecated(forRemoval=true) public AmqpEnvironmentBuilder consumerExecutorService(ExecutorService consumerExecutorService) Deprecated, for removal: This API element is subject to removal in a future version.Do not use anymoreDeprecated, do not use anymore. Consumers do not use a polling loop anymore.Set executor service used for consumer loops.
The library uses sensible defaults, override only in case of problems.
- Parameters:
consumerExecutorService
- the executor service- Returns:
- this builder instance
-
metricsCollector
Set up aMetricsCollector
.- Parameters:
metricsCollector
- the metrics collector- Returns:
- this builder instance
- See Also:
-
observationCollector
Set up anObservationCollector
.- Parameters:
observationCollector
- the observation collector- Returns:
- this builder instance
- See Also:
-
connectionSettings
Returns connection settings shared by connection builders.These settings are optional, they are overridden with the appropriate methods in
ConnectionBuilder
.- Returns:
- shared connection settings
- See Also:
-
build
Create the environment instance.- Specified by:
build
in interfaceEnvironmentBuilder
- Returns:
- the configured environment
-