public class MethodRabbitListenerEndpoint extends AbstractRabbitListenerEndpoint
RabbitListenerEndpoint
providing the method to invoke to process
an incoming message for this endpoint.Constructor and Description |
---|
MethodRabbitListenerEndpoint() |
Modifier and Type | Method and Description |
---|---|
protected HandlerAdapter |
configureListenerAdapter(MessagingMessageListenerAdapter messageListener)
Create a
HandlerAdapter for this listener adapter. |
protected MessagingMessageListenerAdapter |
createMessageListener(MessageListenerContainer container)
Create a
MessageListener that is able to serve this endpoint for the
specified container. |
protected MessagingMessageListenerAdapter |
createMessageListenerInstance()
Create an empty
MessagingMessageListenerAdapter instance. |
Object |
getBean() |
protected StringBuilder |
getEndpointDescription() |
protected org.springframework.messaging.handler.annotation.support.MessageHandlerMethodFactory |
getMessageHandlerMethodFactory() |
Method |
getMethod() |
void |
setBean(Object bean)
Set the object instance that should manage this endpoint.
|
void |
setErrorHandler(RabbitListenerErrorHandler errorHandler)
Set the
RabbitListenerErrorHandler to invoke if the listener method
throws an exception. |
void |
setMessageHandlerMethodFactory(org.springframework.messaging.handler.annotation.support.MessageHandlerMethodFactory messageHandlerMethodFactory)
Set the
MessageHandlerMethodFactory to use to build the
InvocableHandlerMethod responsible to manage the invocation
of this endpoint. |
void |
setMethod(Method method)
Set the method to invoke to process a message managed by this endpoint.
|
void |
setReturnExceptions(boolean returnExceptions)
Set whether exceptions thrown by the listener should be returned to the sender
using the normal
replyTo/@SendTo semantics. |
getAdmin, getAutoStartup, getBeanExpressionContext, getBeanFactory, getBeanResolver, getConcurrency, getGroup, getId, getPriority, getQueueNames, getQueues, getResolver, isExclusive, setAdmin, setAutoStartup, setBeanFactory, setConcurrency, setExclusive, setGroup, setId, setPriority, setQueueNames, setQueues, setupListenerContainer, toString
public void setBean(Object bean)
bean
- the target bean instance.public Object getBean()
public void setMethod(Method method)
method
- the target method for the bean
.public Method getMethod()
public void setMessageHandlerMethodFactory(org.springframework.messaging.handler.annotation.support.MessageHandlerMethodFactory messageHandlerMethodFactory)
MessageHandlerMethodFactory
to use to build the
InvocableHandlerMethod
responsible to manage the invocation
of this endpoint.messageHandlerMethodFactory
- the MessageHandlerMethodFactory
instance.public void setReturnExceptions(boolean returnExceptions)
replyTo/@SendTo
semantics.returnExceptions
- true to return exceptions.public void setErrorHandler(RabbitListenerErrorHandler errorHandler)
RabbitListenerErrorHandler
to invoke if the listener method
throws an exception.errorHandler
- the error handler.protected org.springframework.messaging.handler.annotation.support.MessageHandlerMethodFactory getMessageHandlerMethodFactory()
protected MessagingMessageListenerAdapter createMessageListener(MessageListenerContainer container)
AbstractRabbitListenerEndpoint
MessageListener
that is able to serve this endpoint for the
specified container.createMessageListener
in class AbstractRabbitListenerEndpoint
container
- the MessageListenerContainer
to create a MessageListener
.MessageListener
instance.protected HandlerAdapter configureListenerAdapter(MessagingMessageListenerAdapter messageListener)
HandlerAdapter
for this listener adapter.messageListener
- the listener adapter.protected MessagingMessageListenerAdapter createMessageListenerInstance()
MessagingMessageListenerAdapter
instance.MessagingMessageListenerAdapter
instance.protected StringBuilder getEndpointDescription()
getEndpointDescription
in class AbstractRabbitListenerEndpoint
Available to subclasses, for inclusion in their toString()
result.