Package io.micronaut.rabbitmq.connect
Class ChannelInitializer
java.lang.Object
io.micronaut.rabbitmq.connect.ChannelInitializer
- All Implemented Interfaces:
io.micronaut.context.event.BeanCreatedEventListener<ChannelPool>
,EventListener
public abstract class ChannelInitializer
extends Object
implements io.micronaut.context.event.BeanCreatedEventListener<ChannelPool>
A base class to extend from to do initialization work with
a channel before any consumers or producers are created.
- Since:
- 1.1.0
- Author:
- James Kleeh
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
initialize
(com.rabbitmq.client.Channel channel, String name) Do any work with a channel.onCreated
(io.micronaut.context.event.BeanCreatedEvent<ChannelPool> event)
-
Constructor Details
-
ChannelInitializer
public ChannelInitializer()
-
-
Method Details
-
initialize
Do any work with a channel.- Parameters:
channel
- The channel to usename
- The name of the channel pool, like configured under `rabbitmq.servers`- Throws:
IOException
- If any error occurs
-
onCreated
- Specified by:
onCreated
in interfaceio.micronaut.context.event.BeanCreatedEventListener<ChannelPool>
-