public abstract class AbstractAggregator extends AbstractInterceptingMessageProcessor implements org.mule.runtime.api.lifecycle.Initialisable, MuleContextAware, FlowConstructAware, Aggregator, org.mule.runtime.api.lifecycle.Startable, org.mule.runtime.api.lifecycle.Stoppable, org.mule.runtime.api.lifecycle.Disposable
AbstractEventAggregator will aggregate a set of messages into a single message. EIP Reference:
http://www.eaipatterns.com/Aggregator.htmlReactiveProcessor.ProcessingType| Modifier and Type | Field and Description |
|---|---|
protected EventCorrelator |
eventCorrelator |
static String |
EVENTS_STORE_REGISTRY_KEY_PREFIX |
protected String |
eventsObjectStoreKey |
static int |
MAX_PROCESSED_GROUPS |
protected MuleContext |
muleContext |
protected boolean |
persistentStores |
protected String |
storePrefix |
flowConstruct, logger, next| Constructor and Description |
|---|
AbstractAggregator() |
| Modifier and Type | Method and Description |
|---|---|
org.reactivestreams.Publisher<Event> |
apply(org.reactivestreams.Publisher<Event> publisher)
Applies a
Publisher function transforming a stream of Event's. |
void |
dispose() |
void |
expireAggregation(String groupId) |
protected abstract EventCorrelatorCallback |
getCorrelatorCallback(MuleContext muleContext) |
String |
getStorePrefix() |
long |
getTimeout() |
protected void |
initEventGroupsObjectStore() |
void |
initialise() |
protected void |
initProcessedGroupsObjectStore() |
boolean |
isFailOnTimeout() |
boolean |
isPersistentStores() |
Event |
process(Event event)
Invokes the MessageProcessor.
|
void |
setEventGroupsObjectStore(PartitionableObjectStore<Event> eventGroupsObjectStore) |
void |
setFailOnTimeout(boolean failOnTimeout) |
void |
setMuleContext(MuleContext context) |
void |
setPersistentStores(boolean persistentStores) |
void |
setProcessedGroupsObjectStore(org.mule.runtime.api.store.ObjectStore<Long> processedGroupsObjectStore) |
void |
setStorePrefix(String storePrefix) |
void |
setTimeout(long timeout) |
void |
start() |
void |
stop() |
applyNext, getListener, getMuleContext, isEventValid, processNext, setFlowConstruct, setListener, toStringgetAnnotation, getAnnotations, getLocation, setAnnotationsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsetFlowConstructsetListenergetProcessingTypepublic static final int MAX_PROCESSED_GROUPS
public static final String EVENTS_STORE_REGISTRY_KEY_PREFIX
protected EventCorrelator eventCorrelator
protected MuleContext muleContext
protected boolean persistentStores
protected String storePrefix
protected String eventsObjectStoreKey
public void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionprotected void initProcessedGroupsObjectStore()
protected void initEventGroupsObjectStore()
throws org.mule.runtime.api.lifecycle.InitialisationException
org.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 setMuleContext(MuleContext context)
setMuleContext in interface MuleContextAwaresetMuleContext in class AbstractInterceptingMessageProcessorBasecontext - the Mule node.protected abstract EventCorrelatorCallback getCorrelatorCallback(MuleContext muleContext)
public Event process(Event event) throws org.mule.runtime.api.exception.MuleException
Processorpublic org.reactivestreams.Publisher<Event> apply(org.reactivestreams.Publisher<Event> publisher)
ProcessorPublisher function transforming a stream of Event's.
The default implementation delegates to Processor.process(Event) and will:
Processor.process(Event) returns null.public void expireAggregation(String groupId) throws org.mule.runtime.api.exception.MuleException
expireAggregation in interface Aggregatororg.mule.runtime.api.exception.MuleExceptionpublic long getTimeout()
public void setTimeout(long timeout)
setTimeout in interface Aggregatorpublic boolean isFailOnTimeout()
public void setFailOnTimeout(boolean failOnTimeout)
setFailOnTimeout in interface Aggregatorpublic void setProcessedGroupsObjectStore(org.mule.runtime.api.store.ObjectStore<Long> processedGroupsObjectStore)
public void setEventGroupsObjectStore(PartitionableObjectStore<Event> eventGroupsObjectStore)
public boolean isPersistentStores()
public void setPersistentStores(boolean persistentStores)
public String getStorePrefix()
public void setStorePrefix(String storePrefix)
public void dispose()
dispose in interface org.mule.runtime.api.lifecycle.DisposableCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.