Package org.springframework.jms.config
Class AbstractJmsListenerEndpoint
java.lang.Object
org.springframework.jms.config.AbstractJmsListenerEndpoint
- All Implemented Interfaces:
JmsListenerEndpoint
- Direct Known Subclasses:
MethodJmsListenerEndpoint
,SimpleJmsListenerEndpoint
Base model for a JMS listener endpoint.
- Since:
- 4.1
- Author:
- Stephane Nicoll, Juergen Hoeller
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract MessageListener
createMessageListener
(MessageListenerContainer container) Create aMessageListener
that is able to serve this endpoint for the specified container.Return the concurrency for the listener, if any.Return the name of the destination for this endpoint.protected StringBuilder
Return a description for this endpoint.getId()
Return the id of this endpoint (possibly generated).Return the JMS message selector expression, if any.Return the name for the durable subscription, if any.void
setConcurrency
(String concurrency) Set a concurrency for the listener, if any.void
setDestination
(String destination) Set the name of the destination for this endpoint.void
Set a custom id for this endpoint.void
setSelector
(String selector) Set the JMS message selector expression.void
setSubscription
(String subscription) Set the name for the durable subscription.void
setupListenerContainer
(MessageListenerContainer listenerContainer) Set up the specified message listener container with the model defined by this endpoint.toString()
-
Constructor Details
-
AbstractJmsListenerEndpoint
public AbstractJmsListenerEndpoint()
-
-
Method Details
-
setId
Set a custom id for this endpoint. -
getId
Return the id of this endpoint (possibly generated).- Specified by:
getId
in interfaceJmsListenerEndpoint
-
setDestination
Set the name of the destination for this endpoint. -
getDestination
Return the name of the destination for this endpoint. -
setSubscription
Set the name for the durable subscription. -
getSubscription
Return the name for the durable subscription, if any. -
setSelector
Set the JMS message selector expression.See the JMS specification for a detailed definition of selector expressions.
-
getSelector
Return the JMS message selector expression, if any. -
setConcurrency
Set a concurrency for the listener, if any.The concurrency limits can be a "lower-upper" String, e.g. "5-10", or a simple upper limit String, e.g. "10" (the lower limit will be 1 in this case).
The underlying container may or may not support all features. For instance, it may not be able to scale: in that case only the upper value is used.
-
getConcurrency
Return the concurrency for the listener, if any. -
setupListenerContainer
Description copied from interface:JmsListenerEndpoint
Set up the specified message listener container with the model defined by this endpoint.This endpoint must provide the requested missing option(s) of the specified container to make it usable. Usually, this is about setting the
destination
and themessageListener
to use but an implementation may override any default setting that was already set.- Specified by:
setupListenerContainer
in interfaceJmsListenerEndpoint
- Parameters:
listenerContainer
- the listener container to configure
-
createMessageListener
Create aMessageListener
that is able to serve this endpoint for the specified container. -
getEndpointDescription
Return a description for this endpoint.Available to subclasses, for inclusion in their
toString()
result. -
toString
-