org.norther.tammi.spray.template
Class DefaultTaskFilter

java.lang.Object
  extended by org.norther.tammi.core.base.Adaptee
      extended by org.norther.tammi.spray.filter.DefaultFilter
          extended by org.norther.tammi.spray.filter.DefaultKeyFilter
              extended by org.norther.tammi.spray.filter.DefaultSecureKeyFilter
                  extended by org.norther.tammi.spray.template.DefaultTaskFilter
All Implemented Interfaces:
Serializable, NotificationBroadcaster, NotificationEmitter, Filter, Manageable, MBeanDelegate, AccessController, KeyFilter, SecureFilter, SecureKeyFilter, TaskFilter

public class DefaultTaskFilter
extends DefaultSecureKeyFilter
implements TaskFilter

A default implementation of TaskFilter.

Version:
$Id: DefaultTaskFilter.java,v 1.9 2010-05-05 10:33:51 cvsimp Exp $
Author:
Ilkka Priha
See Also:
Serialized Form

Field Summary
static String TASK_KEY
          The default key.
 
Fields inherited from class org.norther.tammi.spray.filter.DefaultKeyFilter
DEFAULT_KEY
 
Fields inherited from class org.norther.tammi.core.base.Adaptee
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS
 
Constructor Summary
DefaultTaskFilter()
          Constructs a new filter.
DefaultTaskFilter(String key)
          Constructs a new filter with a key.
 
Method Summary
 void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
           
 String getDefaultTask()
          Gets the default task.
 ObjectName getTaskLoaderName()
          Gets the the task loader of this filter.
 void postmanaged()
          This method is called when the implementing adaptee has been managed either during post-registration of the corresponding adapter MBean or just after it is explicitly added to the adapter MBean during run-time.
 void setDefaultTask(String name)
          Sets the default task.
 void setTaskLoaderName(ObjectName loader)
          Sets the task loader of this filter.
 void unmanaged()
          This method is called when the implementing adaptee is unmanaged either during pre-deregistration of the corresponding adapter MBean or just before it is explicitly removed from the adapter MBean during run-time.
 
Methods inherited from class org.norther.tammi.spray.filter.DefaultSecureKeyFilter
addAllowedPermission, addDeniedPermission, allowedPermissions, allowedRoleSet, checkPermission, checkPermission, clearAllowedPermissions, clearDeniedPermissions, deniedPermissions, deniedRoleSet, getPermissibleRoles, isProtected, removeAllowedPermissions, removeDeniedPermissions, setAllowedPermissions, setDeniedPermissions
 
Methods inherited from class org.norther.tammi.spray.filter.DefaultKeyFilter
getKey, getKeyValue, getKeyValues, isLinkedKey, setKey, setLinkedKey
 
Methods inherited from class org.norther.tammi.spray.filter.DefaultFilter
destroy, getFilterConfig, getRequestMap, getSessionMap, init
 
Methods inherited from class org.norther.tammi.core.base.Adaptee
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.norther.tammi.spray.filter.SecureFilter
checkPermission
 
Methods inherited from interface org.norther.tammi.core.security.AccessController
addAllowedPermission, addDeniedPermission, allowedPermissions, allowedRoleSet, checkPermission, clearAllowedPermissions, clearDeniedPermissions, deniedPermissions, deniedRoleSet, getPermissibleRoles, isProtected, removeAllowedPermissions, removeDeniedPermissions, setAllowedPermissions, setDeniedPermissions
 
Methods inherited from interface org.norther.tammi.spray.filter.KeyFilter
getKey, getKeyValue, getKeyValues, isLinkedKey, setKey, setLinkedKey
 
Methods inherited from interface javax.servlet.Filter
destroy, init
 

Field Detail

TASK_KEY

public static final String TASK_KEY
The default key.

See Also:
Constant Field Values
Constructor Detail

DefaultTaskFilter

public DefaultTaskFilter()
Constructs a new filter.


DefaultTaskFilter

public DefaultTaskFilter(String key)
Constructs a new filter with a key.

Parameters:
key - the filter key.
Method Detail

postmanaged

public void postmanaged()
Description copied from interface: Manageable
This method is called when the implementing adaptee has been managed either during post-registration of the corresponding adapter MBean or just after it is explicitly added to the adapter MBean during run-time.

Specified by:
postmanaged in interface Manageable
Overrides:
postmanaged in class Adaptee

unmanaged

public void unmanaged()
               throws Exception
Description copied from interface: Manageable
This method is called when the implementing adaptee is unmanaged either during pre-deregistration of the corresponding adapter MBean or just before it is explicitly removed from the adapter MBean during run-time.

Specified by:
unmanaged in interface Manageable
Overrides:
unmanaged in class Adaptee
Throws:
Exception - if the adaptee refused to be unmanaged.

getDefaultTask

public String getDefaultTask()
Description copied from interface: TaskFilter
Gets the default task.

Specified by:
getDefaultTask in interface TaskFilter
Returns:
the name of the default task.

setDefaultTask

public void setDefaultTask(String name)
Description copied from interface: TaskFilter
Sets the default task.

Specified by:
setDefaultTask in interface TaskFilter
Parameters:
name - the name of the default task.

getTaskLoaderName

public ObjectName getTaskLoaderName()
Description copied from interface: TaskFilter
Gets the the task loader of this filter.

Specified by:
getTaskLoaderName in interface TaskFilter
Returns:
the object name of the task loader or a query.

setTaskLoaderName

public void setTaskLoaderName(ObjectName loader)
Description copied from interface: TaskFilter
Sets the task loader of this filter. If it is not set, the default one will be used.

Specified by:
setTaskLoaderName in interface TaskFilter
Parameters:
loader - the object name of the task loader or a query.

doFilter

public void doFilter(ServletRequest request,
                     ServletResponse response,
                     FilterChain chain)
              throws ServletException,
                     IOException
Specified by:
doFilter in interface Filter
Overrides:
doFilter in class DefaultFilter
Throws:
ServletException
IOException


Copyright © 2004 The Norther Organization. All rights reserved.