Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tomcat.modules.config
Class AutoDeploy

    java.lang.Object
      org.apache.tomcat.core.BaseInterceptor
          org.apache.tomcat.modules.config.AutoDeploy

public class AutoDeploy
extends BaseInterceptor

Will manage a repository of .war files, expanding them automatically and eventually re-deploying them. Based on the original AutoSetup.

Author:
  cmanolache@yahoo.com

Field Summary

Fields inherited from class org.apache.tomcat.core.BaseInterceptor
`cm, ct, ctx, debug, DECLINED, loghelper, OK`

Constructor Summary
`AutoDeploy()`

Method Summary
`void` | `addContext(ContextManager cm, Context ctx)` Called when a context is added to a CM.
`void` | `addInterceptor(ContextManager cm, Context ctx, BaseInterceptor module)` Find all wars and expand them.
`void` | `contextInit(Context context)` Notify when a context is initialized.
`void` | `reload(Request req, Context context)` Reload notification - called whenever a reload is done.
`void` | `setFlat(boolean b)` "Flat" directory support - no virtual host support.
`void` | `setRedeploy(boolean b)` Re-deploy the context if the war file is modified.
`void` | `setSource(java.lang.String d)` Directory where war files are deployed Defaults to TOMCAT_HOME/webapps.
`void` | `setTarget(java.lang.String d)` Directory where war files are deployed Defaults to TOMCAT_HOME/webapps.

Methods inherited from class org.apache.tomcat.core.BaseInterceptor
`addContainer, addHandler, addSecurityConstraint, afterBody, authenticate, authorize, beforeBody, beforeCommit, contextMap, contextShutdown, contextState, copyContext, engineInit, engineShutdown, engineStart, engineState, engineStop, findSession, getContext, getContextManager, getDebug, getInfo, getLog, getNote, getNote, handleError, log, log, log, log, postInitCheck, postReadRequest, postRequest, postService, postServletDestroy, postServletInit, preInitCheck, preService, preServletDestroy, preServletInit, registerHooks, removeContainer, removeContext, removeHandler, removeInterceptor, requestMap, sessionState, setContext, setContextManager, setDebug, setInfo, setNote, setNote`

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

Constructor Detail

### AutoDeploy

    public AutoDeploy()

Method Detail

### setSource

    public void setSource(java.lang.String d)

  Directory where war files are deployed Defaults to TOMCAT_HOME/webapps.

### setTarget

    public void setTarget(java.lang.String d)

  Directory where war files are deployed Defaults to TOMCAT_HOME/webapps.

### setFlat

    public void setFlat(boolean b)

  "Flat" directory support - no virtual host support. XXX Not implemented - only true.

### setRedeploy

    public void setRedeploy(boolean b)

  Re-deploy the context if the war file is modified.

### addInterceptor

    public void addInterceptor(ContextManager cm,
                               Context ctx,
                               BaseInterceptor module)
                        throws TomcatException

  Find all wars and expand them. Do this as early as possible - we don't need anything from the engine.

  Overrides:
    `addInterceptor` in class `BaseInterceptor`
  Parameters:
    `cm` - the server
    `ctx` - not null if this is a local interceptor
    `module` - the new added interceptor
  Throws:
    `TomcatException` - The module will not be added if any module throws an exception.

### addContext

    public void addContext(ContextManager cm,
                           Context ctx)
                    throws TomcatException

  Description copied from class: `BaseInterceptor`
  Called when a context is added to a CM. The context is probably not initialized yet, only path, docRoot, host, and properties set before adding the context ( in server.xml for example ) are available. At this stage mappers can start creating structures for the context ( the actual loading of the context may be delayed in future versions of tomcat until the first access ). DefaultCMSetter will also adjust the logger and paths based on context manager properties. Any activity that depends on web.xml must be done at init time.

  Overrides:
    `addContext` in class `BaseInterceptor`
  Throws:
    `TomcatException`

### contextInit

    public void contextInit(Context context)
                     throws TomcatException

  Description copied from class: `BaseInterceptor`
  Notify when a context is initialized. The first interceptor in the chain for contextInit must read web.xml and set the context. When this method is called you can expect the context to be filled in with all the informations from web.xml.

  Overrides:
    `contextInit` in class `BaseInterceptor`
  Throws:
    `TomcatException`

### reload

    public void reload(Request req,
                       Context context)
                throws TomcatException

  Description copied from class: `BaseInterceptor`
  Reload notification - called whenever a reload is done. This can be used to serialize sessions, log the event, remove any resource that was class-loader dependent. Note. The current implementation uses a note "oldLoader" that will keep a reference to the previous class loader during this hook. It will be set by the module that creates the loaders, and should be destroyed when the hook is done. This can also be implemented using a get/setOldClassLoader in Context, but so far this is used in only 2 modules, adding new API is not needed.

  Overrides:
    `reload` in class `BaseInterceptor`
  Throws:
    `TomcatException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001 Apache Software Foundation. All Rights Reserved.