Class JMSListenerContainerFactory

java.lang.Object
io.micronaut.jms.listener.JMSListenerContainerFactory

@Singleton @Deprecated public class JMSListenerContainerFactory extends Object
Deprecated.
as of 2.1.1
Generates and tracks JMSListenerContainer within the Bean Context.
Since:
1.0.0
Author:
Elliott Pope
See Also:
  • Constructor Details

    • JMSListenerContainerFactory

      public JMSListenerContainerFactory()
      Deprecated.
  • Method Details

    • registerListener

      public <T> void registerListener(JMSConnectionPool connectionPool, String destination, MessageHandler<T> listener, Class<T> clazz, JMSDestinationType type)
      Deprecated.
      Generates a new JMSListenerContainer and registers the provided MessageHandler as the receiving executable method.

      NOTE: this method is not recommended for registering new JMSListenerContainers however can be used to register them dynamically and allow for safe shutdown within the Bean Context.

      Type Parameters:
      T - the class type
      Parameters:
      connectionPool - the pool
      destination - the queue or topic name
      listener - the message listener
      clazz - the message type
      type - the destination type
    • registerListener

      public <T> void registerListener(JMSConnectionPool connectionPool, String destination, javax.jms.MessageListener listener, Class<T> clazz, boolean transacted, int acknowledgeMode, JMSDestinationType type, Optional<String> messageSelector)
      Deprecated.
      Generates a new JMSListenerContainer and registers the provided MessageListener as the receiving executable method.

      NOTE: this method is not recommended for registering new JMSListenerContainers however it can be used to register them dynamically and allow for safe shutdown within the Bean Context.

      Type Parameters:
      T - the class type
      Parameters:
      connectionPool - the pool
      destination - the queue or topic name
      listener - the message listener
      clazz - the message type
      transacted - indicates whether the session will use a local transaction
      acknowledgeMode - when transacted is false, indicates how messages received by the session will be acknowledged
      type - the destination type
      messageSelector - the message selector for the listener
      See Also:
      • Session.AUTO_ACKNOWLEDGE
      • Session.CLIENT_ACKNOWLEDGE
      • Session.DUPS_OK_ACKNOWLEDGE
    • getRegisteredListener

      public JMSListenerContainer<?> getRegisteredListener(String destination)
      Deprecated.
      The JMSListenerContainer that is listening to the given destination.
      Parameters:
      destination - the name of a queue or topic
      Returns:
      the container
    • shutdown

      @PreDestroy public void shutdown()
      Deprecated.
      Shuts down the listeners registered with this factory.
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object