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

java.lang.Object
  extended by org.norther.tammi.spray.loader.task.Action
All Implemented Interfaces:
Serializable, Task
Direct Known Subclasses:
QuickLogout, SilentLogout, Submit

public abstract class Action
extends Object
implements Task, Serializable

Action is an abstract base class for tasks.

Based on Action in the Apache Jakarta Turbine project.

Version:
$Id: Action.java,v 1.17 2010-05-28 12:52:22 cvsimp Exp $
Author:
Jason van Zyl, Ilkka Priha
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.norther.tammi.spray.loader.task.Task
Task.Control
 
Constructor Summary
Action()
          Constructs a new action.
 
Method Summary
abstract  Task.Control execute(ServletRequest request, ServletResponse response, FilterChain chain, Object context)
          Executes customized functionality.
protected
<V> V
find(Class<V> clazz, FilterChain chain)
          Finds the default MBean.
protected  Object find(ObjectName name, FilterChain chain)
          Finds the named MBean.
protected
<F extends Filter>
F
getFilter(Class<F> clazz, FilterChain chain)
          Gets the specified filter.
protected  MBeanServer getMBeanServer(FilterChain chain)
          Gets the current MBean server.
 void initialize(ServletRequest request, ServletResponse response, FilterChain chain, Object context)
          Initializes customized functionality after construction but before the first execution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Action

public Action()
Constructs a new action.

Method Detail

initialize

public void initialize(ServletRequest request,
                       ServletResponse response,
                       FilterChain chain,
                       Object context)
Description copied from interface: Task
Initializes customized functionality after construction but before the first execution. The initialization parameters are the same as given to the first execution.

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

execute

public abstract Task.Control execute(ServletRequest request,
                                     ServletResponse response,
                                     FilterChain chain,
                                     Object context)
                              throws Exception
Description copied from interface: Task
Executes customized functionality.

Specified by:
execute in interface Task
Parameters:
request - the request.
response - the response.
chain - the filter chain.
context - a task specific context.
Returns:
the execution control or null.
Throws:
Exception - on errors.

find

protected <V> V find(Class<V> clazz,
                     FilterChain chain)
Finds the default MBean.

Type Parameters:
V - the class type.
Parameters:
clazz - the class.
chain - the filter chain.
Returns:
the default MBean or null.

find

protected Object find(ObjectName name,
                      FilterChain chain)
Finds the named MBean.

Parameters:
name - the object name.
chain - the filter chain.
Returns:
the named MBean or null.

getFilter

protected <F extends Filter> F getFilter(Class<F> clazz,
                                         FilterChain chain)
Gets the specified filter.

Type Parameters:
F - the filter type.
Parameters:
clazz - the class of the filter.
chain - the filter chain.
Returns:
the specified filter or null.

getMBeanServer

protected MBeanServer getMBeanServer(FilterChain chain)
Gets the current MBean server.

Parameters:
chain - the filter chain.
Returns:
the MBean server or null.


Copyright © 2004 The Norther Organization. All rights reserved.