org.talika.tarsis.filters
Class CommandFilter

java.lang.Object
  extended by org.talika.tarsis.filters.AbstractFilter
      extended by org.talika.tarsis.filters.CommandFilter
All Implemented Interfaces:
javax.servlet.Filter
Direct Known Subclasses:
CacheFilter, DuplicateRequestFilter, IsSecureFilter, LoginFilter, SecurityFilter, ValidatorFilter

public abstract class CommandFilter
extends AbstractFilter

Base Filter implementation for all command aware filters.

Version:
$Revision: 133 $
Author:
Jose M. Palomar

Constructor Summary
CommandFilter()
           
 
Method Summary
 void destroy()
          Called by the web container to indicate to a filter that it is being taken out of service.
protected  Command findCommand(javax.servlet.ServletRequest request)
          Returns Command instance for current request.
protected  CommandFactory getCommandFactory()
          Returns command factory instance.
 void init(javax.servlet.FilterConfig filterConfig)
          Called by the web container to indicate to a filter that it is being placed into service.
 
Methods inherited from class org.talika.tarsis.filters.AbstractFilter
doFilter, getContext, getFilterConfig, getLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandFilter

public CommandFilter()
Method Detail

init

public void init(javax.servlet.FilterConfig filterConfig)
          throws javax.servlet.ServletException
Called by the web container to indicate to a filter that it is being placed into service.

Initialization consits in calling super init method and storing in a local variable command factory instance for further use.

Specified by:
init in interface javax.servlet.Filter
Overrides:
init in class AbstractFilter
Parameters:
filterConfig - FilterConfig filter configutarion.
Throws:
javax.servlet.ServletException - if an exception has occurred that interferes with the filter's normal operation
See Also:
Filter.init(FilterConfig)

destroy

public void destroy()
Called by the web container to indicate to a filter that it is being taken out of service.

Specified by:
destroy in interface javax.servlet.Filter
Overrides:
destroy in class AbstractFilter
See Also:
Filter.destroy()

findCommand

protected final Command findCommand(javax.servlet.ServletRequest request)
Returns Command instance for current request.

Parameters:
request - ServletRequest the ServletResponse object that contains the servlet's response.
Returns:
Command Command instance for current request or null if no command is found.

getCommandFactory

protected final CommandFactory getCommandFactory()
Returns command factory instance.

Returns:
CommandFactory command factory instance.


Copyright © 2002-2012 Talika Open Source Group. All Rights Reserved.