org.mule.routing.requestreply
Class AbstractAsyncRequestReplyRequester
java.lang.Object
org.mule.processor.AbstractInterceptingMessageProcessor
org.mule.routing.requestreply.AbstractAsyncRequestReplyRequester
- All Implemented Interfaces:
- FlowConstructAware, MuleContextAware, InterceptingMessageProcessor, MessageProcessor, RequestReplyRequesterMessageProcessor, MessageSource
- Direct Known Subclasses:
- ServiceAsyncRequestReplyRequestor, SimpleAsyncRequestReplyRequester
public abstract class AbstractAsyncRequestReplyRequester
- extends AbstractInterceptingMessageProcessor
- implements RequestReplyRequesterMessageProcessor, FlowConstructAware
MAX_PROCESSED_GROUPS
public static final int MAX_PROCESSED_GROUPS
- See Also:
- Constant Field Values
timeout
protected volatile long timeout
failOnTimeout
protected volatile boolean failOnTimeout
replyMessageSource
protected MessageSource replyMessageSource
flowConstruct
protected FlowConstruct flowConstruct
locks
protected final Map<String,Latch> locks
responseEvents
protected final edu.emory.mathcs.backport.java.util.concurrent.ConcurrentMap responseEvents
processedLock
protected final Object processedLock
processed
protected final BoundedFifoBuffer processed
AbstractAsyncRequestReplyRequester
public AbstractAsyncRequestReplyRequester()
process
public MuleEvent process(MuleEvent event)
throws MuleException
- Description copied from interface:
MessageProcessor
- Invokes the MessageProcessor.
- Specified by:
process
in interface MessageProcessor
- Parameters:
event
- MuleEvent to be processed
- Returns:
- optional response MuleEvent
- Throws:
MuleException
setTimeout
public void setTimeout(long timeout)
setFailOnTimeout
public void setFailOnTimeout(boolean failOnTimeout)
setReplySource
public void setReplySource(MessageSource messageSource)
- Specified by:
setReplySource
in interface RequestReplyRequesterMessageProcessor
verifyReplyMessageSource
protected void verifyReplyMessageSource(MessageSource messageSource)
getAsyncReplyCorrelationId
protected String getAsyncReplyCorrelationId(MuleEvent event)
sendAsyncRequest
protected void sendAsyncRequest(MuleEvent event)
throws MuleException
- Throws:
MuleException
receiveAsyncReply
protected MuleEvent receiveAsyncReply(MuleEvent event)
throws ResponseTimeoutException
- Throws:
ResponseTimeoutException
postLatchAwait
protected void postLatchAwait(String asyncReplyCorrelationId)
addProcessed
protected void addProcessed(Object id)
isAlreadyProcessed
protected boolean isAlreadyProcessed(Object id)
toString
public String toString()
- Overrides:
toString
in class AbstractInterceptingMessageProcessor
setFlowConstruct
public void setFlowConstruct(FlowConstruct flowConstruct)
- Specified by:
setFlowConstruct
in interface FlowConstructAware
Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.