public abstract class AbstractAsyncRequestReplyRequester extends AbstractInterceptingMessageProcessorBase implements RequestReplyRequesterMessageProcessor, FlowConstructAware, org.mule.runtime.api.lifecycle.Initialisable, org.mule.runtime.api.lifecycle.Startable, org.mule.runtime.api.lifecycle.Stoppable, org.mule.runtime.api.lifecycle.Disposable
ReactiveProcessor.ProcessingType| Modifier and Type | Field and Description |
|---|---|
protected boolean |
failOnTimeout |
protected FlowConstruct |
flowConstruct |
protected Map<String,Latch> |
locks |
static int |
MAX_PROCESSED_GROUPS |
protected String |
name |
static String |
NAME_TEMPLATE |
protected Object |
processedLock |
protected MessageSource |
replyMessageSource |
protected ConcurrentMap<String,Event> |
responseEvents |
protected ListableObjectStore |
store |
protected long |
timeout |
static int |
UNCLAIMED_INTERVAL |
static int |
UNCLAIMED_TIME_TO_LIVE |
logger, muleContext, next| Constructor and Description |
|---|
AbstractAsyncRequestReplyRequester() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addProcessed(Object id) |
protected Latch |
createEventLock()
Creates the lock used to synchronize a given event
|
void |
dispose() |
protected String |
getAsyncReplyCorrelationId(Event event) |
ReactiveProcessor.ProcessingType |
getProcessingType()
In order for Mule to determine the best way to execute different processors based on the chosen
ProcessingStrategy it
needs to know the type of work the message processor will be performing and if it is ReactiveProcessor.ProcessingType.BLOCKING,
ReactiveProcessor.ProcessingType.CPU_INTENSIVE intensive or neither (ReactiveProcessor.ProcessingType.CPU_LITE). |
void |
initialise() |
protected boolean |
isAlreadyProcessed(Object id) |
protected void |
postLatchAwait(String asyncReplyCorrelationId) |
Event |
process(Event event)
Invokes the MessageProcessor.
|
protected Event |
receiveAsyncReply(Event event) |
protected void |
sendAsyncRequest(Event event) |
void |
setFailOnTimeout(boolean failOnTimeout) |
void |
setFlowConstruct(FlowConstruct flowConstruct) |
void |
setReplySource(MessageSource messageSource) |
void |
setStorePrefix(String storePrefix) |
void |
setTimeout(long timeout) |
void |
start() |
void |
stop() |
String |
toString() |
protected void |
verifyReplyMessageSource(MessageSource messageSource) |
applyNext, getListener, getMuleContext, isEventValid, processNext, setListener, setMuleContextgetAnnotation, getAnnotations, getLocation, setAnnotationspublic static final int MAX_PROCESSED_GROUPS
public static final int UNCLAIMED_TIME_TO_LIVE
public static int UNCLAIMED_INTERVAL
public static final String NAME_TEMPLATE
protected String name
protected volatile long timeout
protected volatile boolean failOnTimeout
protected MessageSource replyMessageSource
protected FlowConstruct flowConstruct
protected final ConcurrentMap<String,Event> responseEvents
protected final Object processedLock
protected ListableObjectStore store
public Event process(Event event) throws org.mule.runtime.api.exception.MuleException
Processorprotected Latch createEventLock()
public void setTimeout(long timeout)
public void setFailOnTimeout(boolean failOnTimeout)
public void setReplySource(MessageSource messageSource)
setReplySource in interface RequestReplyRequesterMessageProcessormessageSource - the message source that will be used to receive the reply messagepublic void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionpublic void start()
throws org.mule.runtime.api.exception.MuleException
start in interface org.mule.runtime.api.lifecycle.Startableorg.mule.runtime.api.exception.MuleExceptionpublic void stop()
throws org.mule.runtime.api.exception.MuleException
stop in interface org.mule.runtime.api.lifecycle.Stoppableorg.mule.runtime.api.exception.MuleExceptionpublic void dispose()
dispose in interface org.mule.runtime.api.lifecycle.Disposablepublic void setStorePrefix(String storePrefix)
protected void verifyReplyMessageSource(MessageSource messageSource)
protected void sendAsyncRequest(Event event) throws org.mule.runtime.api.exception.MuleException
org.mule.runtime.api.exception.MuleExceptionprotected Event receiveAsyncReply(Event event) throws org.mule.runtime.api.exception.MuleException
org.mule.runtime.api.exception.MuleExceptionprotected void postLatchAwait(String asyncReplyCorrelationId) throws MessagingException
MessagingExceptionprotected void addProcessed(Object id)
protected boolean isAlreadyProcessed(Object id)
public String toString()
toString in class AbstractInterceptingMessageProcessorBasepublic void setFlowConstruct(FlowConstruct flowConstruct)
setFlowConstruct in interface FlowConstructAwaresetFlowConstruct in class AbstractInterceptingMessageProcessorBasepublic ReactiveProcessor.ProcessingType getProcessingType()
ReactiveProcessorProcessingStrategy it
needs to know the type of work the message processor will be performing and if it is ReactiveProcessor.ProcessingType.BLOCKING,
ReactiveProcessor.ProcessingType.CPU_INTENSIVE intensive or neither (ReactiveProcessor.ProcessingType.CPU_LITE).getProcessingType in interface ReactiveProcessorCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.