Package org.apache.synapse.continuation
Class AbstractContinuationState
- java.lang.Object
-
- org.apache.synapse.continuation.AbstractContinuationState
-
- All Implemented Interfaces:
ContinuationState
- Direct Known Subclasses:
ReliantContinuationState,SeqContinuationState
public abstract class AbstractContinuationState extends Object implements ContinuationState
-
-
Constructor Summary
Constructors Constructor Description AbstractContinuationState()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLeafChild(ContinuationState leafChild)Add a Leaf child to this ContinuationStateContinuationStategetChildContState()Get the child ContinuationStateContinuationStategetLeafChild()Get the Leaf Child of this ContinuationState.intgetPosition()Get the position of the mediator in the current flow.booleanhasChild()Check whether child ContinuationState existsvoidremoveLeafChild()Remove the Leaf child form this ContinuationState.voidsetChildContState(ContinuationState childContState)Set the child ContinuationState.voidsetPosition(int position)Set the position of the mediator in the flow which is currently being processed.
-
-
-
Method Detail
-
getChildContState
public ContinuationState getChildContState()
Get the child ContinuationState- Specified by:
getChildContStatein interfaceContinuationState- Returns:
- child ContinuationState
-
setChildContState
public void setChildContState(ContinuationState childContState)
Set the child ContinuationState. Child ContinuationState is added when branching the flow using all FlowContinuableMediators except Sequence Mediator.- Specified by:
setChildContStatein interfaceContinuationState- Parameters:
childContState- ContinuationState to be added as the child
-
getPosition
public int getPosition()
Get the position of the mediator in the current flow.- Specified by:
getPositionin interfaceContinuationState- Returns:
- position
-
setPosition
public void setPosition(int position)
Set the position of the mediator in the flow which is currently being processed. Position should be updated only when branching to a new flow (i.e. not necessary to update for each and every mediator execution in the flow)- Specified by:
setPositionin interfaceContinuationState- Parameters:
position- position of the mediator which is currently being processed in the flow.
-
hasChild
public boolean hasChild()
Check whether child ContinuationState exists- Specified by:
hasChildin interfaceContinuationState- Returns:
- whether child ContinuationState exists
-
getLeafChild
public ContinuationState getLeafChild()
Get the Leaf Child of this ContinuationState. When mediate using the ContinuationStateStack, first we start from the Lead Child of the ContinuationState.- Specified by:
getLeafChildin interfaceContinuationState- Returns:
- Leaf child of the ContinuationState
-
addLeafChild
public void addLeafChild(ContinuationState leafChild)
Add a Leaf child to this ContinuationState- Specified by:
addLeafChildin interfaceContinuationState- Parameters:
leafChild- ContinuationState which can be added as a Leaf child for this SeqContinuationState
-
removeLeafChild
public void removeLeafChild()
Remove the Leaf child form this ContinuationState.- Specified by:
removeLeafChildin interfaceContinuationState
-
-