com.bankframe.fe.statemachine.ext.apps
Class Controller
java.lang.Object
com.bankframe.fe.statemachine.ext.apps.Controller
- All Implemented Interfaces:
- IController, Cloneable
- Direct Known Subclasses:
- NoSessionController
public class Controller
- extends Object
- implements IController, Cloneable
Constructor Summary |
Controller()
Constructor for Controller. |
Controller
public Controller()
- Constructor for Controller.
getResult
public IStateTransition getResult(RequestContext requestContext,
IEvent event)
throws StateMachineUserException
- Description copied from interface:
IController
- Implement this method to choose between the possible state transitions from this event.
Typically the decision will be made based on the contents of the request and possibly some interaction with the model.
Any data required by the view should be added to the response.
- Specified by:
getResult
in interface IController
- Parameters:
requestContext
- the user request context.event
- the event to process.
- Returns:
- the state transition to follow.
- Throws:
StateMachineUserException
- can be thrown if an application exception occurs.- See Also:
IController.getResult(RequestContext, IEvent)
doSideEffects
public void doSideEffects(RequestContext requestContext,
IStateTransition transition)
throws StateMachineUserException
- Description copied from interface:
IController
- This method is called by the statemachine after it has determined that the transition to the new state can be made without any errors.
It is called before the view for the result state is built.
It gives you an opportunity to interact with the model before the transition is completed.
Note that this does not stop you sending messages to the model in the getResult method.
- Specified by:
doSideEffects
in interface IController
- Parameters:
requestContext
- the user request context.transition
- the state transition that has been followed.
- Throws:
StateMachineUserException
- can be thrown if an application exception occurs.- See Also:
IController.doSideEffects(RequestContext, IStateTransition)
clone
public Object clone()
- Overrides:
clone
in class Object
setControllerProperties
public void setControllerProperties(Properties newControllerProperties)
- Specified by:
setControllerProperties
in interface IController
Copyright © 2005, 2007, Oracle. All rights reserved.