Package io.micronaut.rabbitmq.connect
Class ChannelInitializer
- java.lang.Object
-
- io.micronaut.rabbitmq.connect.ChannelInitializer
-
- All Implemented Interfaces:
io.micronaut.context.event.BeanCreatedEventListener<ChannelPool>,java.util.EventListener
public abstract class ChannelInitializer extends java.lang.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
-
-
Constructor Summary
Constructors Constructor Description ChannelInitializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidinitialize(com.rabbitmq.client.Channel channel)Deprecated.Overrideinitialize(Channel, String)insteadvoidinitialize(com.rabbitmq.client.Channel channel, java.lang.String name)Do any work with a channel.ChannelPoolonCreated(io.micronaut.context.event.BeanCreatedEvent<ChannelPool> event)
-
-
-
Method Detail
-
initialize
@Deprecated public void initialize(com.rabbitmq.client.Channel channel) throws java.io.IOExceptionDeprecated.Overrideinitialize(Channel, String)insteadDo any work with a channel.- Parameters:
channel- The channel to use- Throws:
java.io.IOException- If any error occurs
-
initialize
public void initialize(com.rabbitmq.client.Channel channel, java.lang.String name) throws java.io.IOExceptionDo any work with a channel.- Parameters:
channel- The channel to usename- The name of the channel pool, like configured under `rabbitmq.servers`- Throws:
java.io.IOException- If any error occurs
-
onCreated
public ChannelPool onCreated(io.micronaut.context.event.BeanCreatedEvent<ChannelPool> event)
- Specified by:
onCreatedin interfaceio.micronaut.context.event.BeanCreatedEventListener<ChannelPool>
-
-