Package io.micronaut.jms.listener
Class JMSListenerContainer<T>
java.lang.Object
io.micronaut.jms.listener.JMSListenerContainer<T>
- Type Parameters:
T- theMessageobject type to convert to before handling
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 Summary
ConstructorsConstructorDescriptionJMSListenerContainer(JMSConnectionPool connectionPool, JMSDestinationType type, int threadPoolSize) Deprecated.JMSListenerContainer(JMSConnectionPool connectionPool, JMSDestinationType type, int threadPoolSize, int maxThreadPoolSize) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidregisterListener(String destination, MessageHandler<T> listener, Class<T> clazz) Deprecated.Registers aJMSListenerContainerwith default concurrency.voidregisterListener(String destination, javax.jms.MessageListener listener, Class<T> clazz, boolean transacted, int acknowledgeMode, Optional<String> messageSelector) Deprecated.Internal method used by theJMSListenerContainerFactoryfor registering new listeners.booleanshutdown()Deprecated.Safely shuts down all open connections linked to the listener container.toString()Deprecated.
-
Constructor Details
-
JMSListenerContainer
public JMSListenerContainer(JMSConnectionPool connectionPool, JMSDestinationType type, int threadPoolSize) Deprecated.- Parameters:
connectionPool- theJMSConnectionPoolto pullConnections from to createMessageListenerstype- eitherJMSDestinationType.QUEUEorJMSDestinationType.TOPIC.threadPoolSize- the pool size
-
JMSListenerContainer
public JMSListenerContainer(JMSConnectionPool connectionPool, JMSDestinationType type, int threadPoolSize, int maxThreadPoolSize) Deprecated.- Parameters:
connectionPool- theJMSConnectionPoolto pullConnections from to createMessageListenerstype- eitherJMSDestinationType.QUEUEorJMSDestinationType.TOPIC.threadPoolSize- the minimum core thread pool sizemaxThreadPoolSize- the maximum number of threads to use handling incoming requests
-
-
Method Details
-
registerListener
Deprecated.Registers aJMSListenerContainerwith default concurrency.NOTE: this method is not recommended; instead use the annotation driven
JMSListener- Parameters:
destination- the queue or topic namelistener- the message handlerclazz- 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 theJMSListenerContainerFactoryfor registering new listeners.NOTE: this method is used internally by the
AbstractJMSListenerMethodProcessorand is not recommended for use. Instead the annotation drivenJMSListeneris preferred.- Parameters:
destination- the queue or topic namelistener- the message handlerclazz- the message typetransacted- indicates whether the session will use a local transactionacknowledgeMode- when transacted is false, indicates how messages received by the session will be acknowledgedmessageSelector- the message selector for the listener- See Also:
-
Session.AUTO_ACKNOWLEDGESession.CLIENT_ACKNOWLEDGESession.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
Deprecated.
-