org.mortbay.jetty.servlet
Class WebApplicationHandler

java.lang.Object
  |
  +--org.mortbay.http.handler.AbstractHttpHandler
        |
        +--org.mortbay.jetty.servlet.ServletHandler
              |
              +--org.mortbay.jetty.servlet.WebApplicationHandler
All Implemented Interfaces:
HttpHandler, LifeCycle, java.io.Serializable

public class WebApplicationHandler
extends ServletHandler

WebApp HttpHandler. This handler extends the ServletHandler with security, filter and resource capabilities to provide full J2EE web container support.

Since:
Jetty 4.1
Version:
$Id: WebApplicationHandler.java,v 1.24 2003/04/26 11:46:43 gregwilkins Exp $
Author:
Greg Wilkins
See Also:
WebApplicationContext, Serialized Form

Field Summary
 
Fields inherited from class org.mortbay.jetty.servlet.ServletHandler
__DEFAULT_SERVLET
 
Constructor Summary
WebApplicationHandler()
           
 
Method Summary
 FilterHolder defineFilter(java.lang.String name, java.lang.String className)
           
 FilterHolder getFilter(java.lang.String name)
           
 java.util.List getFilters()
           
 void initializeServlets()
          Initialize load-on-startup servlets.
 boolean isAcceptRanges()
           
 boolean isStarted()
           
 FilterHolder mapPathToFilter(java.lang.String pathSpec, java.lang.String filterName)
           
 FilterHolder mapServletToFilter(java.lang.String servletName, java.lang.String filterName)
           
 void setAcceptRanges(boolean ar)
          Set if the handler accepts range requests.
 void start()
          Start the LifeCycle.
 void stop()
          Stop the LifeCycle.
 
Methods inherited from class org.mortbay.jetty.servlet.ServletHandler
addEventListener, addServlet, addServlet, addServlet, formAuthInit, getClassLoader, getHolderEntry, getLogSink, getNamedDispatcher, getRealPath, getRequestDispatcher, getResource, getResourceAsStream, getResourcePaths, getServletContext, getServletHolder, getServletMap, getServlets, getSessionManager, handle, initialize, isAutoInitializeServlets, isUsingCookies, mapPathToServlet, newServletHolder, newServletHolder, removeEventListener, setAutoInitializeServlets, setDynamicInitParams, setDynamicServletPathSpec, setLogSink, setServeDynamicSystemServlets, setSessionManager, setUsingCookies
 
Methods inherited from class org.mortbay.http.handler.AbstractHttpHandler
getHttpContext, getName, handleTrace, setName, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WebApplicationHandler

public WebApplicationHandler()
Method Detail

isAcceptRanges

public boolean isAcceptRanges()

setAcceptRanges

public void setAcceptRanges(boolean ar)
Set if the handler accepts range requests. Default is false;

Parameters:
ar - True if the handler should accept ranges

defineFilter

public FilterHolder defineFilter(java.lang.String name,
                                 java.lang.String className)

getFilter

public FilterHolder getFilter(java.lang.String name)

mapServletToFilter

public FilterHolder mapServletToFilter(java.lang.String servletName,
                                       java.lang.String filterName)

getFilters

public java.util.List getFilters()

mapPathToFilter

public FilterHolder mapPathToFilter(java.lang.String pathSpec,
                                    java.lang.String filterName)

isStarted

public boolean isStarted()
Specified by:
isStarted in interface LifeCycle
Overrides:
isStarted in class AbstractHttpHandler
Returns:
True if the LifeCycle has been started.

start

public void start()
           throws java.lang.Exception
Description copied from interface: LifeCycle
Start the LifeCycle.

Specified by:
start in interface LifeCycle
Overrides:
start in class ServletHandler
Throws:
java.lang.Exception - An arbitrary exception may be thrown.

initializeServlets

public void initializeServlets()
                        throws java.lang.Exception
Description copied from class: ServletHandler
Initialize load-on-startup servlets. Called automatically from start if autoInitializeServlet is true.

Overrides:
initializeServlets in class ServletHandler
java.lang.Exception

stop

public void stop()
          throws java.lang.InterruptedException
Description copied from interface: LifeCycle
Stop the LifeCycle. The LifeCycle may wait for current activities to complete normally, but it can be interrupted.

Specified by:
stop in interface LifeCycle
Overrides:
stop in class ServletHandler
Throws:
java.lang.InterruptedException - Stopping a lifecycle is rarely atomic and may be interrupted by another thread. If this happens InterruptedException is throw and the component will be in an indeterminant state and should probably be discarded.


Copyright ? 2000 Mortbay Consulting Pty. Ltd. All Rights Reserved.