Package org.apache.synapse.mediators
Interface ListMediator
-
- All Superinterfaces:
ManagedLifecycle
,Mediator
,SynapseArtifact
- All Known Subinterfaces:
FilterMediator
- All Known Implementing Classes:
AbstractListMediator
,AnonymousListMediator
,FilterMediator
,InMediator
,OutMediator
,SequenceMediator
,SynapseMediator
,TemplateMediator
,ValidateMediator
public interface ListMediator extends Mediator, ManagedLifecycle
The List mediator executes a given sequence/list of child mediators.This interface extends
ManagedLifecycle
. An implementations must propagate lifecycle events to all children implementing the ManagedLifecycle interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
addAll(List<Mediator> c)
Appends all of the mediators in the specified collection to the end of this mediator's (children) list, in the order that they are returned by the specified collection's iteratorboolean
addChild(Mediator m)
Appends the specified mediator to the end of this mediator's (children) listMediator
getChild(int pos)
Returns the mediator at the specified positionList<Mediator>
getList()
Return the list of mediators of this List mediator instanceMediator
removeChild(int pos)
Removes the mediator at the specified position in this listboolean
removeChild(Mediator m)
Removes the first occurrence in this list of the specified mediator-
Methods inherited from interface org.apache.synapse.ManagedLifecycle
destroy, init
-
Methods inherited from interface org.apache.synapse.Mediator
getMediatorName, getMediatorPosition, getShortDescription, getTraceState, getType, isContentAltering, isContentAware, mediate, reportCloseStatistics, reportOpenStatistics, setComponentStatisticsId, setMediatorPosition, setShortDescription, setTraceState
-
Methods inherited from interface org.apache.synapse.SynapseArtifact
getDescription, setDescription
-
-
-
-
Method Detail
-
addChild
boolean addChild(Mediator m)
Appends the specified mediator to the end of this mediator's (children) list- Parameters:
m
- the mediator to be added- Returns:
- true (as per the general contract of the Collection.add method)
-
addAll
boolean addAll(List<Mediator> c)
Appends all of the mediators in the specified collection to the end of this mediator's (children) list, in the order that they are returned by the specified collection's iterator- Parameters:
c
- the list of mediators to be added- Returns:
- true if this list changed as a result of the call
-
getChild
Mediator getChild(int pos)
Returns the mediator at the specified position- Parameters:
pos
- index of mediator to return- Returns:
- the mediator at the specified position in this list
-
removeChild
boolean removeChild(Mediator m)
Removes the first occurrence in this list of the specified mediator- Parameters:
m
- mediator to be removed from this list, if present- Returns:
- true if this list contained the specified mediator
-
removeChild
Mediator removeChild(int pos)
Removes the mediator at the specified position in this list- Parameters:
pos
- the index of the mediator to remove- Returns:
- the mediator previously at the specified position
-
-