Package org.springframework.jms.config
Class MethodJmsListenerEndpoint
- java.lang.Object
- org.springframework.jms.config.AbstractJmsListenerEndpoint
- org.springframework.jms.config.MethodJmsListenerEndpoint
- All Implemented Interfaces:
Aware
,BeanFactoryAware
,JmsListenerEndpoint
public class MethodJmsListenerEndpoint extends AbstractJmsListenerEndpoint implements BeanFactoryAware
AJmsListenerEndpoint
providing the method to invoke to process an incoming message for this endpoint.- Since:
- 4.1
- Author:
- Stephane Nicoll, Juergen Hoeller
Constructor Summary
Constructors Constructor Description MethodJmsListenerEndpoint()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MessagingMessageListenerAdapter
createMessageListener(MessageListenerContainer container)
Create aMessageListener
that is able to serve this endpoint for the specified container.protected MessagingMessageListenerAdapter
createMessageListenerInstance()
Create an emptyMessagingMessageListenerAdapter
instance.Object
getBean()
protected String
getDefaultResponseDestination()
Return the default response destination, if any.protected StringBuilder
getEndpointDescription()
Return a description for this endpoint.Method
getMethod()
Method
getMostSpecificMethod()
void
setBean(Object bean)
Set the actual bean instance to invoke this endpoint method on.void
setBeanFactory(BeanFactory beanFactory)
Set theBeanFactory
to use to resolve expressions (may benull
).void
setEmbeddedValueResolver(StringValueResolver embeddedValueResolver)
Set a value resolver for embedded placeholders and expressions.void
setMessageHandlerMethodFactory(MessageHandlerMethodFactory messageHandlerMethodFactory)
Set theMessageHandlerMethodFactory
to use to build theInvocableHandlerMethod
responsible to manage the invocation of this endpoint.void
setMethod(Method method)
Set the method to invoke for processing a message managed by this endpoint.void
setMostSpecificMethod(Method mostSpecificMethod)
Set the most specific method known for this endpoint's declaration.Methods inherited from class org.springframework.jms.config.AbstractJmsListenerEndpoint
getConcurrency, getDestination, getId, getSelector, getSubscription, setConcurrency, setDestination, setId, setSelector, setSubscription, setupListenerContainer, toString
Constructor Detail
MethodJmsListenerEndpoint
public MethodJmsListenerEndpoint()
Method Detail
setBean
public void setBean(@Nullable Object bean)
Set the actual bean instance to invoke this endpoint method on.
setMethod
public void setMethod(@Nullable Method method)
Set the method to invoke for processing a message managed by this endpoint.
setMostSpecificMethod
public void setMostSpecificMethod(@Nullable Method mostSpecificMethod)
Set the most specific method known for this endpoint's declaration.In case of a proxy, this will be the method on the target class (if annotated itself, that is, if not just annotated in an interface).
- Since:
- 4.2.3
getMostSpecificMethod
@Nullable public Method getMostSpecificMethod()
setMessageHandlerMethodFactory
public void setMessageHandlerMethodFactory(MessageHandlerMethodFactory messageHandlerMethodFactory)
Set theMessageHandlerMethodFactory
to use to build theInvocableHandlerMethod
responsible to manage the invocation of this endpoint.
setEmbeddedValueResolver
public void setEmbeddedValueResolver(@Nullable StringValueResolver embeddedValueResolver)
Set a value resolver for embedded placeholders and expressions.
setBeanFactory
public void setBeanFactory(@Nullable BeanFactory beanFactory)
Set theBeanFactory
to use to resolve expressions (may benull
).- Specified by:
setBeanFactory
in interfaceBeanFactoryAware
- Parameters:
beanFactory
- owning BeanFactory (nevernull
). The bean can immediately call methods on the factory.- See Also:
BeanInitializationException
createMessageListener
protected MessagingMessageListenerAdapter createMessageListener(MessageListenerContainer container)
Description copied from class:AbstractJmsListenerEndpoint
Create aMessageListener
that is able to serve this endpoint for the specified container.- Specified by:
createMessageListener
in classAbstractJmsListenerEndpoint
createMessageListenerInstance
protected MessagingMessageListenerAdapter createMessageListenerInstance()
Create an emptyMessagingMessageListenerAdapter
instance.- Returns:
- a new
MessagingMessageListenerAdapter
or subclass thereof
getDefaultResponseDestination
@Nullable protected String getDefaultResponseDestination()
Return the default response destination, if any.
getEndpointDescription
protected StringBuilder getEndpointDescription()
Description copied from class:AbstractJmsListenerEndpoint
Return a description for this endpoint.Available to subclasses, for inclusion in their
toString()
result.- Overrides:
getEndpointDescription
in classAbstractJmsListenerEndpoint