|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RequestControlContext
Mutable control interface used to manipulate an ongoing flow execution in the context of one client request. Primarily used internally by the various flow artifacts when they are invoked.
This interface acts as a facade for core definition constructs such as the central Flow
and
State
classes, abstracting away details about the runtime execution machine defined in the
execution engine implementation
package.
Note this type is not the same as the FlowExecutionContext
. Objects of this type are request specific:
they provide a control interface for manipulating exactly one flow execution locally from exactly one request. A
FlowExecutionContext
provides information about a single flow execution (conversation), and it's scope
is not local to a specific request (or thread).
Flow
,
State
,
FlowExecution
,
FlowExecutionContext
Method Summary | |
---|---|
FlowSession |
endActiveFlowSession(MutableAttributeMap output)
End the active flow session of the current flow execution. |
ViewSelection |
execute(Transition transition)
Execute this transition out of the current source state. |
void |
setCurrentState(State state)
Record the current state that has entered in the executing flow. |
void |
setLastEvent(Event lastEvent)
Record the last event signaled in the executing flow. |
void |
setLastTransition(Transition lastTransition)
Record the last transition that executed in the executing flow. |
ViewSelection |
signalEvent(Event event)
Signals the occurence of an event in the current state of this flow execution request context. |
ViewSelection |
start(Flow flow,
MutableAttributeMap input)
Spawn a new flow session and activate it in the currently executing flow. |
Methods inherited from interface org.springframework.webflow.execution.RequestContext |
---|
getActiveFlow, getAttributes, getConversationScope, getCurrentState, getExternalContext, getFlashScope, getFlowExecutionContext, getFlowScope, getLastEvent, getLastTransition, getModel, getRequestParameters, getRequestScope, setAttributes |
Method Detail |
---|
void setLastEvent(Event lastEvent)
lastEvent
- the last event signaledFlow.onEvent(RequestControlContext)
void setLastTransition(Transition lastTransition)
lastTransition
- the last transition that executedTransition.execute(State, RequestControlContext)
void setCurrentState(State state)
state
- the current stateState.enter(RequestControlContext)
ViewSelection start(Flow flow, MutableAttributeMap input) throws FlowExecutionException
This will start a new flow session in the current flow execution, which is already active.
flow
- the flow to start, its start()
method will be calledinput
- initial contents of the newly created flow session (may be null
, e.g. empty)
FlowExecutionException
- if an exception was thrown within a state of the flow during execution of this
start operationFlow.start(RequestControlContext, MutableAttributeMap)
ViewSelection signalEvent(Event event) throws FlowExecutionException
onEvent()
method of the flow involved in the flow execution will be called.
event
- the event that occured
FlowExecutionException
- if an exception was thrown within a state of the flow during execution of this
signalEvent operationFlow.onEvent(RequestControlContext)
FlowSession endActiveFlowSession(MutableAttributeMap output) throws java.lang.IllegalStateException
end()
method of the flow involved in the flow execution will be
called.
output
- output produced by the session that is eligible for mapping by a resuming parent flow
java.lang.IllegalStateException
- when the flow execution is not activeFlow.end(RequestControlContext, MutableAttributeMap)
ViewSelection execute(Transition transition)
transition
- the transition
Transition.execute(State, RequestControlContext)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |