public class StartableCompositeMessageSource extends org.mule.runtime.api.meta.AbstractAnnotatedObject implements CompositeMessageSource, org.mule.runtime.api.lifecycle.Lifecycle, FlowConstructAware, MuleContextAware
CompositeMessageSource that propagates both injection of FlowConstruct and lifecycle to
nested MessageSources.
MessageSource is started in isolation when composite is stopped then messages will be lost.
| Modifier and Type | Field and Description |
|---|---|
protected FlowConstruct |
flowConstruct |
protected AtomicBoolean |
initialised |
protected Processor |
listener |
protected static org.slf4j.Logger |
logger |
protected MuleContext |
muleContext |
protected List<MessageSource> |
sources |
protected AtomicBoolean |
started |
protected AtomicBoolean |
starting |
| Constructor and Description |
|---|
StartableCompositeMessageSource() |
| Modifier and Type | Method and Description |
|---|---|
void |
addSource(MessageSource source) |
void |
dispose() |
List<MessageSource> |
getSources() |
void |
initialise() |
void |
removeSource(MessageSource source) |
void |
setFlowConstruct(FlowConstruct pattern) |
void |
setListener(Processor listener)
Set the MessageProcessor listener on a message source which will be invoked when a message is received or generated.
|
void |
setMessageSources(List<MessageSource> sources) |
void |
setMuleContext(MuleContext context) |
void |
start() |
void |
stop() |
String |
toString() |
getAnnotation, getAnnotations, getLocation, setAnnotationsprotected static final org.slf4j.Logger logger
protected Processor listener
protected AtomicBoolean initialised
protected AtomicBoolean started
protected final List<MessageSource> sources
protected AtomicBoolean starting
protected FlowConstruct flowConstruct
protected MuleContext muleContext
public void addSource(MessageSource source) throws org.mule.runtime.api.exception.MuleException
addSource in interface CompositeMessageSourceorg.mule.runtime.api.exception.MuleExceptionpublic void removeSource(MessageSource source) throws org.mule.runtime.api.exception.MuleException
removeSource in interface CompositeMessageSourceorg.mule.runtime.api.exception.MuleExceptionpublic void setMessageSources(List<MessageSource> sources) throws org.mule.runtime.api.exception.MuleException
org.mule.runtime.api.exception.MuleExceptionpublic 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 setListener(Processor listener)
MessageSourcesetListener in interface MessageSourcepublic void setFlowConstruct(FlowConstruct pattern)
setFlowConstruct in interface FlowConstructAwarepublic List<MessageSource> getSources()
getSources in interface CompositeMessageSourcepublic void setMuleContext(MuleContext context)
setMuleContext in interface MuleContextAwarecontext - the Mule node.Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.