org.springframework.webflow.engine
Class EndState
java.lang.Object
org.springframework.webflow.core.AnnotatedObject
org.springframework.webflow.engine.State
org.springframework.webflow.engine.EndState
- All Implemented Interfaces:
- Annotated, StateDefinition
public class EndState
- extends State
A state that ends a flow when entered. This state ends the active flow session of an ongoing flow execution.
If the ended session is the "root flow session" the entire flow execution ends, signaling the end of a logical
conversation.
If the terminated session was acting as a subflow, the flow execution continues and control is returned to the parent
flow session. In that case, this state returns an ending result event the resuming parent flow responds to.
An end state may be configured with a renderer to render a final response. This renderer will be invoked if the end
state terminates the entire flow execution.
- Author:
- Keith Donald, Colin Sampaleanu, Erwin Vervaet
- See Also:
SubflowState
Constructor Summary |
EndState(Flow flow,
String id)
Create a new end state with no associated view. |
Method Summary |
void |
setFinalResponseAction(Action finalResponseAction)
Sets the renderer that will render the final flow execution response. |
void |
setOutputMapper(Mapper outputMapper)
Sets the attribute mapper to use for mapping output attributes exposed by this end state when it is entered. |
Methods inherited from class org.springframework.webflow.engine.State |
enter, equals, getEntryActionList, getExceptionHandlerSet, getFlow, getId, getOwner, handleException, hashCode, isStartState, isViewState, toString |
EndState
public EndState(Flow flow,
String id)
throws IllegalArgumentException
- Create a new end state with no associated view.
- Parameters:
flow
- the owning flowid
- the state identifier (must be unique to the flow)
- Throws:
IllegalArgumentException
- when this state cannot be added to given flow, e.g. because the id is not unique- See Also:
State.State(Flow, String)
,
setFinalResponseAction(Action)
,
setOutputMapper(Mapper)
setFinalResponseAction
public void setFinalResponseAction(Action finalResponseAction)
- Sets the renderer that will render the final flow execution response.
setOutputMapper
public void setOutputMapper(Mapper outputMapper)
- Sets the attribute mapper to use for mapping output attributes exposed by this end state when it is entered.