public abstract class AbstractJmsListenerEndpoint extends java.lang.Object implements JmsListenerEndpoint
MethodJmsListenerEndpoint
,
SimpleJmsListenerEndpoint
Constructor and Description |
---|
AbstractJmsListenerEndpoint() |
Modifier and Type | Method and Description |
---|---|
protected abstract MessageListener |
createMessageListener(MessageListenerContainer container)
Create a
MessageListener that is able to serve this endpoint for the
specified container. |
java.lang.String |
getConcurrency()
Return the concurrency for the listener, if any.
|
java.lang.String |
getDestination()
Return the name of the destination for this endpoint.
|
protected java.lang.StringBuilder |
getEndpointDescription()
Return a description for this endpoint.
|
java.lang.String |
getId()
Return the id of this endpoint.
|
java.lang.String |
getSelector()
Return the JMS message selector expression, if any.
|
java.lang.String |
getSubscription()
Return the name for the durable subscription, if any.
|
void |
setConcurrency(java.lang.String concurrency)
Set a concurrency for the listener, if any.
|
void |
setDestination(java.lang.String destination)
Set the name of the destination for this endpoint.
|
void |
setId(java.lang.String id) |
void |
setSelector(java.lang.String selector)
Set the JMS message selector expression.
|
void |
setSubscription(java.lang.String subscription)
Set the name for the durable subscription.
|
void |
setupListenerContainer(MessageListenerContainer listenerContainer)
Setup the specified message listener container with the model
defined by this endpoint.
|
java.lang.String |
toString() |
public void setId(java.lang.String id)
public java.lang.String getId()
JmsListenerEndpoint
getId
in interface JmsListenerEndpoint
public void setDestination(@Nullable java.lang.String destination)
@Nullable public java.lang.String getDestination()
public void setSubscription(@Nullable java.lang.String subscription)
@Nullable public java.lang.String getSubscription()
public void setSelector(@Nullable java.lang.String selector)
See the JMS specification for a detailed definition of selector expressions.
@Nullable public java.lang.String getSelector()
public void setConcurrency(@Nullable java.lang.String concurrency)
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.
@Nullable public java.lang.String getConcurrency()
public void setupListenerContainer(MessageListenerContainer listenerContainer)
JmsListenerEndpoint
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 the messageListener
to
use but an implementation may override any default setting that
was already set.
setupListenerContainer
in interface JmsListenerEndpoint
listenerContainer
- the listener container to configureprotected abstract MessageListener createMessageListener(MessageListenerContainer container)
MessageListener
that is able to serve this endpoint for the
specified container.protected java.lang.StringBuilder getEndpointDescription()
Available to subclasses, for inclusion in their toString()
result.
public java.lang.String toString()
toString
in class java.lang.Object