Class PoolableChannelFactory

  • All Implemented Interfaces:
    org.apache.commons.pool.PoolableObjectFactory<com.rabbitmq.client.Channel>

    public class PoolableChannelFactory
    extends Object
    implements org.apache.commons.pool.PoolableObjectFactory<com.rabbitmq.client.Channel>
    Channel lifecycle manager: create, check and close channel
    • Constructor Detail

      • PoolableChannelFactory

        public PoolableChannelFactory​(com.rabbitmq.client.Connection connection)
    • Method Detail

      • makeObject

        public com.rabbitmq.client.Channel makeObject()
                                               throws Exception
        Specified by:
        makeObject in interface org.apache.commons.pool.PoolableObjectFactory<com.rabbitmq.client.Channel>
        Throws:
        Exception
      • destroyObject

        public void destroyObject​(com.rabbitmq.client.Channel t)
                           throws Exception
        Specified by:
        destroyObject in interface org.apache.commons.pool.PoolableObjectFactory<com.rabbitmq.client.Channel>
        Throws:
        Exception
      • validateObject

        public boolean validateObject​(com.rabbitmq.client.Channel t)
        Specified by:
        validateObject in interface org.apache.commons.pool.PoolableObjectFactory<com.rabbitmq.client.Channel>
      • activateObject

        public void activateObject​(com.rabbitmq.client.Channel t)
                            throws Exception
        Specified by:
        activateObject in interface org.apache.commons.pool.PoolableObjectFactory<com.rabbitmq.client.Channel>
        Throws:
        Exception
      • passivateObject

        public void passivateObject​(com.rabbitmq.client.Channel t)
                             throws Exception
        Specified by:
        passivateObject in interface org.apache.commons.pool.PoolableObjectFactory<com.rabbitmq.client.Channel>
        Throws:
        Exception