## org.eclipse.jetty.server.handler
Class MovedContextHandler

    java.lang.Object
      org.eclipse.jetty.util.component.AbstractLifeCycle
          org.eclipse.jetty.server.handler.AbstractHandler
              org.eclipse.jetty.server.handler.AbstractHandlerContainer
                  org.eclipse.jetty.server.handler.HandlerWrapper
                      org.eclipse.jetty.server.handler.ScopedHandler
                          org.eclipse.jetty.server.handler.ContextHandler
                              org.eclipse.jetty.server.handler.MovedContextHandler

All Implemented Interfaces:
  Handler, HandlerContainer, Server.Graceful, Attributes, LifeCycle

    public class MovedContextHandler

extends ContextHandler

Moved ContextHandler. This context can be used to replace a context that has changed location. Requests are redirected (either to a fixed URL or to a new context base).

Nested Class Summary

Nested classes/interfaces inherited from class org.eclipse.jetty.server.handler.ContextHandler
`ContextHandler.Context`

Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
`AbstractLifeCycle.AbstractLifeCycleListener`

Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
`LifeCycle.Listener`

Field Summary

Fields inherited from class org.eclipse.jetty.server.handler.ContextHandler
`_scontext, MANAGED_ATTRIBUTES`

Fields inherited from class org.eclipse.jetty.server.handler.ScopedHandler
`_nextScope, _outerScope`

Fields inherited from class org.eclipse.jetty.server.handler.HandlerWrapper
`_handler`

Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
`_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING`

Constructor Summary
`MovedContextHandler()`
`MovedContextHandler(HandlerContainer parent, java.lang.String contextPath, java.lang.String newContextURL)`

Method Summary
`java.lang.String` `getExpires()`
`java.lang.String` `getNewContextURL()`
`boolean` `isDiscardPathInfo()`
`boolean` `isDiscardQuery()`
`boolean` `isPermanent()`
`void` `setDiscardPathInfo(boolean discardPathInfo)`
`void` `setDiscardQuery(boolean discardQuery)`
`void` `setExpires(java.lang.String expires)`
`void` `setNewContextURL(java.lang.String newContextURL)`
`void` `setPermanent(boolean permanent)`

Methods inherited from class org.eclipse.jetty.server.handler.ContextHandler

`addEventListener, addLocaleEncoding, callContextDestroyed, callContextInitialized, checkContext, checkManagedAttribute, clearAttributes, doHandle, doScope, doStart, doStop, dump, getAllowNullPathInfo, getAttribute, getAttributeNames, getAttributes, getBaseResource, getClassLoader, getClassPath, getConnectorNames, getContextPath, getCurrentContext, getDisplayName, getErrorHandler, getEventListeners, getInitParameter, getInitParameterNames, getInitParams, getLocaleEncoding, getLocaleEncoding, getLogger, getMaxFormContentSize, getMimeTypes, getResource, getResourceBase, getResourcePaths, getServletContext, getVirtualHosts, getWelcomeFiles, handle, isAliases, isAvailable, isCompactPath, isProtectedTarget, isShutdown, loadClass, newResource, newResource, removeAttribute, restrictEventListener, setAliases, setAllowNullPathInfo, setAttribute, setAttributes, setAvailable, setBaseResource, setClassLoader, setCompactPath, setConnectorNames, setContextPath, setDisplayName, setErrorHandler, setEventListeners, setLogger, setManagedAttribute, setMaxFormContentSize, setMimeTypes, setResourceBase, setServer, setShutdown, setVirtualHosts, setWelcomeFiles, startContext, toString`

Methods inherited from class org.eclipse.jetty.server.handler.ScopedHandler
`handle, never, nextHandle, nextScope`

Methods inherited from class org.eclipse.jetty.server.handler.HandlerWrapper
`expandChildren, getHandler, getHandlers, getNestedHandlerByClass, setHandler`

Methods inherited from class org.eclipse.jetty.server.handler.AbstractHandlerContainer
`dumpHandlers, expandHandler, getChildHandlerByClass, getChildHandlers, getChildHandlersByClass`

Methods inherited from class org.eclipse.jetty.server.handler.AbstractHandler
`destroy, dump, dump, getServer`

Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
`addLifeCycleListener, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.eclipse.jetty.server.Handler
`destroy, getServer, handle`

Methods inherited from interface org.eclipse.jetty.util.component.LifeCycle
`addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop`

Constructor Detail

### MovedContextHandler

    public MovedContextHandler()

### MovedContextHandler

    public MovedContextHandler(HandlerContainer parent,
                               java.lang.String contextPath,
                               java.lang.String newContextURL)

Method Detail

### isDiscardPathInfo

    public boolean isDiscardPathInfo()

### setDiscardPathInfo

    public void setDiscardPathInfo(boolean discardPathInfo)

### getNewContextURL

    public java.lang.String getNewContextURL()

### setNewContextURL

    public void setNewContextURL(java.lang.String newContextURL)

### isPermanent

    public boolean isPermanent()

### setPermanent

    public void setPermanent(boolean permanent)

### isDiscardQuery

    public boolean isDiscardQuery()

### setDiscardQuery

    public void setDiscardQuery(boolean discardQuery)

### getExpires

    public java.lang.String getExpires()

  Returns:
    the expires header value or null if no expires header

### setExpires

    public void setExpires(java.lang.String expires)

  Parameters:
    `expires` - the expires header value or null if no expires header

Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.