Package io.micronaut.rabbitmq.connect
Class RabbitConnectionFactory
java.lang.Object
io.micronaut.rabbitmq.connect.RabbitConnectionFactory
- All Implemented Interfaces:
io.micronaut.context.event.BeanPreDestroyEventListener<ExecutorService>
,EventListener
@Factory
public class RabbitConnectionFactory
extends Object
implements io.micronaut.context.event.BeanPreDestroyEventListener<ExecutorService>
A factory for creating a connection to RabbitMQ.
- Since:
- 1.1.0
- Author:
- James Kleeh
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NonNull ExecutorService
onPreDestroy
(@NonNull io.micronaut.context.event.BeanPreDestroyEvent<ExecutorService> event) Closes active connections associated with theExecutorService
prior to its removal.
-
Constructor Details
-
RabbitConnectionFactory
public RabbitConnectionFactory()
-
-
Method Details
-
onPreDestroy
@NonNull public @NonNull ExecutorService onPreDestroy(@NonNull @NonNull io.micronaut.context.event.BeanPreDestroyEvent<ExecutorService> event) Closes active connections associated with theExecutorService
prior to its removal.- Specified by:
onPreDestroy
in interfaceio.micronaut.context.event.BeanPreDestroyEventListener<ExecutorService>
- Parameters:
event
- The bean created event- Returns:
- The unmodified
ExecutorService
bean
-