org.springframework.integration.adapter
Class MessageHandlingSourceAdapter
java.lang.Object
org.springframework.integration.adapter.MessageHandlingSourceAdapter
- All Implemented Interfaces:
- org.springframework.beans.factory.InitializingBean, MessageHandler
- Direct Known Subclasses:
- HttpInvokerSourceAdapter, RmiSourceAdapter
public class MessageHandlingSourceAdapter
- extends java.lang.Object
- implements MessageHandler, org.springframework.beans.factory.InitializingBean
A source adapter that implements the MessageHandler
interface. It may
be used as a base class for source adapters with request-reply behavior.
- Author:
- Mark Fisher
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
private final org.apache.commons.logging.Log logger
requestChannel
private final MessageChannel requestChannel
requestReplyTemplate
private final RequestReplyTemplate requestReplyTemplate
expectReply
private volatile boolean expectReply
lifecycleMonitor
protected final java.lang.Object lifecycleMonitor
initialized
private volatile boolean initialized
MessageHandlingSourceAdapter
public MessageHandlingSourceAdapter(MessageChannel requestChannel)
- Create an adapter that sends to the provided channel.
- Parameters:
requestChannel
- the channel where messages will be sent, must not be
null
.
setExpectReply
public void setExpectReply(boolean expectReply)
- Specify whether the handle method should be expected to return a reply.
The default is '
true
'.
setRequestTimeout
public void setRequestTimeout(long requestTimeout)
setReplyTimeout
public void setReplyTimeout(long replyTimeout)
getChannel
protected MessageChannel getChannel()
afterPropertiesSet
public final void afterPropertiesSet()
throws java.lang.Exception
- Specified by:
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
- Throws:
java.lang.Exception
initialize
protected void initialize()
throws java.lang.Exception
- Subclasses may override this method for initialization.
- Throws:
java.lang.Exception
handle
public final Message<?> handle(Message<?> message)
- Specified by:
handle
in interface MessageHandler