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
 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
 boolean addChild(Mediator m)
          Appends the specified mediator to the end of this mediator's (children) list
 Mediator getChild(int pos)
          Returns the mediator at the specified position
 List<Mediator> getList()
          Return the list of mediators of this List mediator instance
 Mediator removeChild(int pos)
          Removes the mediator at the specified position in this list
 boolean removeChild(Mediator m)
          Removes the first occurrence in this list of the specified mediator
 
Methods inherited from interface org.apache.synapse.Mediator
getTraceState, getType, mediate, setTraceState
 
Methods inherited from interface org.apache.synapse.SynapseArtifact
getDescription, setDescription
 
Methods inherited from interface org.apache.synapse.ManagedLifecycle
destroy, init
 

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

getList

List<Mediator> getList()
Return the list of mediators of this List mediator instance

Returns:
the child/sub mediator list


Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.