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 void
addLeafChild(ContinuationState leafChild)
Add a Leaf child to this ContinuationStateContinuationState
getChildContState()
Get the child ContinuationStateContinuationState
getLeafChild()
Get the Leaf Child of this ContinuationState.int
getPosition()
Get the position of the mediator in the current flow.boolean
hasChild()
Check whether child ContinuationState existsvoid
removeLeafChild()
Remove the Leaf child form this ContinuationState.void
setChildContState(ContinuationState childContState)
Set the child ContinuationState.void
setPosition(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:
getChildContState
in 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:
setChildContState
in 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:
getPosition
in 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:
setPosition
in 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:
hasChild
in 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:
getLeafChild
in interfaceContinuationState
- Returns:
- Leaf child of the ContinuationState
-
addLeafChild
public void addLeafChild(ContinuationState leafChild)
Add a Leaf child to this ContinuationState- Specified by:
addLeafChild
in 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:
removeLeafChild
in interfaceContinuationState
-
-