org.norther.tammi.spray.loader.task
Class Script

java.lang.Object
  extended by org.norther.tammi.spray.loader.task.Script
All Implemented Interfaces:
Serializable, Task

public class Script
extends Object
implements Task, Serializable

Script provides tasks based acces to ScripterMBean.

Based on ScriptModule in the Apache Jakarta Turbine project.

Author:
Jason van Zyl, Ilkka Priha
See Also:
Serialized Form

Constructor Summary
Script(String name)
          Constructs a new script.
 
Method Summary
 void execute(ServletRequest request, ServletResponse response, FilterChain chain, Object context)
          Executes the script.
 void initialize(ServletRequest request, ServletResponse response, FilterChain chain, Object context)
          Initializes the script.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Script

public Script(String name)
Constructs a new script.

Parameters:
name - the name of the task.
Throws:
IllegalArgumentException - if name is not a script.
Method Detail

initialize

public void initialize(ServletRequest request,
                       ServletResponse response,
                       FilterChain chain,
                       Object context)
Initializes the script.

Specified by:
initialize in interface Task
Parameters:
request - the request.
response - the response.
chain - the filter chain.
context - the context.

execute

public void execute(ServletRequest request,
                    ServletResponse response,
                    FilterChain chain,
                    Object context)
             throws Exception
Executes the script.

Specified by:
execute in interface Task
Parameters:
request - the request.
response - the response.
chain - the filter chain.
context - the context.
Throws:
Exception - on errors.


Copyright © 2004 The Norther Organization. All rights reserved.