Class JMSListenerContainer<T>

java.lang.Object
io.micronaut.jms.listener.JMSListenerContainer<T>
Type Parameters:
T - the Message object type to convert to before handling

@Deprecated public class JMSListenerContainer<T> extends Object
Deprecated.
as of 2.1.1
Sets up and manages MessageListeners created by the JMSListener and AbstractJMSListenerMethodProcessor processing. There is support for programmatically instantiating listeners however this has not been fully incorporated into a coherent API yet and has not been fully tested. It is recommended to instead use the JMSListener annotation on existing classes.
Since:
1.0.0
Author:
Elliott Pope
  • Constructor Details

  • Method Details

    • registerListener

      public void registerListener(String destination, MessageHandler<T> listener, Class<T> clazz)
      Deprecated.
      Registers a JMSListenerContainer with default concurrency.

      NOTE: this method is not recommended; instead use the annotation driven JMSListener

      Parameters:
      destination - the queue or topic name
      listener - the message handler
      clazz - the message type
    • registerListener

      public void registerListener(String destination, javax.jms.MessageListener listener, Class<T> clazz, boolean transacted, int acknowledgeMode, Optional<String> messageSelector)
      Deprecated.
      Internal method used by the JMSListenerContainerFactory for registering new listeners.

      NOTE: this method is used internally by the AbstractJMSListenerMethodProcessor and is not recommended for use. Instead the annotation driven JMSListener is preferred.

      Parameters:
      destination - the queue or topic name
      listener - the message handler
      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
      messageSelector - the message selector for the listener
      See Also:
      • Session.AUTO_ACKNOWLEDGE
      • Session.CLIENT_ACKNOWLEDGE
      • Session.DUPS_OK_ACKNOWLEDGE
    • shutdown

      @PreDestroy public boolean shutdown()
      Deprecated.
      Safely shuts down all open connections linked to the listener container. To be executed when the bean is destroyed.
      Returns:
      true if all open connections are successfully closed
    • toString

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