|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Action
Interface that defines a command action in Tarsis MVC Framework.
The command action is the piece of software responsible of bussines logic.
Action is executed when the command is invoked.
The interface define methods to initialize an action, validate a request, service
a request and to put action out of service. These are known as life-cycle methods
and are called in the following sequence:
init
method.
validate
is called to validate request and then the
execute
method is invoked.
destroy
method, then garbage collected and finalized.
Command
,
View
Method Summary | |
---|---|
void |
destroy()
Called by Tarsis MVC Framework to destroy action. |
java.lang.String |
execute(Request request,
Response response)
Called by Tarsis MVC Framework to handle request everytime command is invoked. |
void |
init(Context context)
Called by Tarsis MVC Framework to initialize action. |
void |
validate(Request request)
Called by Tarsis MVC Framework to validate request everytime command is invoked. |
Method Detail |
---|
void init(Context context) throws ActionException
context
- Context contex of Tarsis MVC Framework.
ActionException
- if an exception has occurred that interferes with the
action's normal operation.UnrecoverableException
void validate(Request request) throws ActionException
request
- Request object representing client's request.
ActionException
- if an exception has occurred that interferes with the
action's normal operation.java.lang.String execute(Request request, Response response) throws ActionException
request
- Request object representing client's request.response
- Response object representing client's reponse.
null
for
default view.
ActionException
- if an exception has occurred that interferes with the
action's normal operation.void destroy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |