Class SessionFilter

  extended by org.mentawai.core.InputWrapper
      extended by org.mentawai.filter.SessionFilter
All Implemented Interfaces:
java.util.Map, Filter, Input

public class SessionFilter
extends InputWrapper
implements Filter

This filter will place the session context in the action input. Note that the SessionContext class is also a Map so it can be easily injected in a pojo action without coupling with the framework API.

Sergio Oliveira Jr.

Nested Class Summary
Nested classes/interfaces inherited from interface java.util.Map
Field Summary
Fields inherited from interface org.mentawai.core.Input
Constructor Summary
SessionFilter(java.lang.String name)
Method Summary
 void destroy()
          Gives a chance to the filter to deallocalte any resources before it is destroyed.
 java.lang.String filter(InvocationChain chain)
          Executes the filter.
 java.lang.Object getValue(java.lang.String name)
          Gets a parameter value (any object) with the given name.
Methods inherited from class org.mentawai.core.InputWrapper
clear, containsKey, containsValue, entries, entrySet, get, getBoolean, getBoolean, getBooleanValue, getBooleanValue, getDate, getDate, getDate, getDouble, getDouble, getDoubleValue, getDoubleValue, getEnum, getFloat, getFloat, getFloatValue, getFloatValue, getHeader, getHeaderKeys, getInt, getInt, getInts, getIntValue, getIntValue, getIntValues, getLong, getLong, getLongValue, getLongValue, getObject, getObject, getObject, getObject, getProperty, getString, getStrings, getStringValue, getStringValues, hasValue, isEmpty, keys, keySet, put, putAll, remove, removeValue, setInput, setValue, size, values
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Map
equals, hashCode

Constructor Detail


public SessionFilter(java.lang.String name)
Method Detail


public java.lang.String filter(InvocationChain chain)
                        throws java.lang.Exception
Description copied from interface: Filter
Executes the filter.

Specified by:
filter in interface Filter
chain - The InvocationChain for the action this filter is being applied to.
The result of the filter or the action the filter is being applied to.


public java.lang.Object getValue(java.lang.String name)
Description copied from interface: Input
Gets a parameter value (any object) with the given name.

Specified by:
getValue in interface Input
getValue in class InputWrapper
name - the name of the parameter
the parameter value (any object) or null if it doesn't exist.


public void destroy()
Description copied from interface: Filter
Gives a chance to the filter to deallocalte any resources before it is destroyed. This is called when the web application is stopped, in other words, this has nothing to do with garbage collection.

Specified by:
destroy in interface Filter

Copyright © 2005 Mentawai Team. All Rights Reserved.