jodd.madvoc
Class MadvocServletFilter

java.lang.Object
  extended by jodd.madvoc.MadvocServletFilter
All Implemented Interfaces:
javax.servlet.Filter

public class MadvocServletFilter
extends java.lang.Object
implements javax.servlet.Filter

Madvoc filter serves as a controller part of the Madvoc framework. If Madvoc @{link WebApplication} is not already created, this filter will initialize and configure the Madvoc using filter init parameters.


Field Summary
protected  Madvoc madvoc
           
protected  MadvocController madvocController
           
 
Constructor Summary
MadvocServletFilter()
           
 
Method Summary
protected  Madvoc createMadvoc(javax.servlet.FilterConfig filterConfig)
          Creates Madvoc web application if not already created.
 void destroy()
          Filter destruction.
 void doFilter(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, javax.servlet.FilterChain chain)
          Builds ActionRequest and invokes it.
 void init(javax.servlet.FilterConfig filterConfig)
          Filter initialization.
protected  java.lang.String processUnhandledPath(java.lang.String actionPath, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
          Process unconsumed action paths.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

madvoc

protected Madvoc madvoc

madvocController

protected MadvocController madvocController
Constructor Detail

MadvocServletFilter

public MadvocServletFilter()
Method Detail

init

public void init(javax.servlet.FilterConfig filterConfig)
          throws javax.servlet.ServletException
Filter initialization.

Specified by:
init in interface javax.servlet.Filter
Throws:
javax.servlet.ServletException

createMadvoc

protected Madvoc createMadvoc(javax.servlet.FilterConfig filterConfig)
Creates Madvoc web application if not already created. Override it to set custom Madvoc configurator or other core settings.


destroy

public void destroy()
Filter destruction.

Specified by:
destroy in interface javax.servlet.Filter

doFilter

public void doFilter(javax.servlet.ServletRequest req,
                     javax.servlet.ServletResponse res,
                     javax.servlet.FilterChain chain)
              throws java.io.IOException,
                     javax.servlet.ServletException
Builds ActionRequest and invokes it. If action result is a chain, it repeats the process.

Specified by:
doFilter in interface javax.servlet.Filter
Throws:
java.io.IOException
javax.servlet.ServletException

processUnhandledPath

protected java.lang.String processUnhandledPath(java.lang.String actionPath,
                                                javax.servlet.ServletRequest request,
                                                javax.servlet.ServletResponse response)
                                         throws java.io.IOException,
                                                javax.servlet.ServletException
Process unconsumed action paths. Returns null if action path is consumed, otherwise returns action path to be consumed by filter chain. By default it just returns action path.

Throws:
java.io.IOException
javax.servlet.ServletException


Copyright © 2003-2012 Jodd Team