Class MessageProducerPool

java.lang.Object
io.micronaut.jms.pool.AbstractPool<PooledObject<javax.jms.MessageProducer>>
io.micronaut.jms.pool.MessageProducerPool

public class MessageProducerPool extends AbstractPool<PooledObject<javax.jms.MessageProducer>>
Pool for ensuring maximum reuse of MessageProducers.
Since:
1.0.0
Author:
Elliott Pope
See Also:
  • Constructor Details

    • MessageProducerPool

      public MessageProducerPool(int initialSize, int maxSize, javax.jms.Session session)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • create

      protected PooledObject<javax.jms.MessageProducer> create(Object... args)
      Description copied from class: AbstractPool
      Create an object for the pool.
      Specified by:
      create in class AbstractPool<PooledObject<javax.jms.MessageProducer>>
      Parameters:
      args - the arguments to be provided to the create method.
      Returns:
      a new object of type <T> for the pool.
    • reset

      protected void reset(PooledObject<javax.jms.MessageProducer> pooledObject)
      Description copied from class: AbstractPool
      Reset the provided object so it can be returned to the pool for reuse.
      Specified by:
      reset in class AbstractPool<PooledObject<javax.jms.MessageProducer>>
      Parameters:
      pooledObject - the object