Class MessageProducerPool

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

public class MessageProducerPool extends AbstractPool<PooledObject<jakarta.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, jakarta.jms.Session session)
  • Method Details

    • toString

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

      protected PooledObject<jakarta.jms.MessageProducer> create(Object... args)
      Description copied from class: AbstractPool
      Create an object for the pool.
      Specified by:
      create in class AbstractPool<PooledObject<jakarta.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<jakarta.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<jakarta.jms.MessageProducer>>
      Parameters:
      pooledObject - the object