Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 20632 invoked by uid 500); 20 Jan 2000 06:32:53 -0000 Delivered-To: apmail-jakarta-tomcat-cvs@jakarta.apache.org Received: (qmail 20629 invoked from network); 20 Jan 2000 06:32:53 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 20 Jan 2000 06:32:53 -0000 Received: (qmail 1249 invoked by uid 2016); 20 Jan 2000 06:32:53 -0000 Delivered-To: apcore-jakarta-tomcat-cvs@apache.org Received: (qmail 1247 invoked from network); 20 Jan 2000 06:32:53 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 20 Jan 2000 06:32:53 -0000 Received: (qmail 20620 invoked by uid 1059); 20 Jan 2000 06:32:51 -0000 Date: 20 Jan 2000 06:32:51 -0000 Message-ID: <20000120063251.20619.qmail@locus.apache.org> From: craigmcc@locus.apache.org To: jakarta-tomcat-cvs@apache.org Subject: cvs commit: jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat Interceptor.java Lifecycle.java LifecycleException.java Loader.java Logger.java Manager.java craigmcc 00/01/19 22:32:51 Added: proposals/catalina/src/share/org/apache/tomcat Interceptor.java Lifecycle.java LifecycleException.java Loader.java Logger.java Manager.java Log: Check-in #2 of the basic interfaces for the "Catalina" proposal. Revision Changes Path 1.1 jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/Interceptor.java Index: Interceptor.java =================================================================== /* * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/Interceptor.java,v 1.1 2000/01/20 06:32:51 craigmcc Exp $ * $Revision: 1.1 $ * $Date: 2000/01/20 06:32:51 $ * * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * * [Additional notices, if required by prior licensing conditions] * */ package org.apache.tomcat; import java.io.IOException; import javax.servlet.ServletException; /** * An Interceptor, as the name implies, intercepts request processing * prior to, and after, the call to a Container's service() * method. Conceptually, a stack of Interceptors can be associated with a * particular Container, which are processed as described for * Container.invoke(). *

* Note that Interceptors may be added to any type of Container, so it * is up to the Interceptor implementation to deal avoid class cast exceptions. * An Interceptor can refuse to be attached to a particular Container by * returning a IllegalArgumentException to the * setContainer() method. * * @author Craig R. McClanahan * @version $Revision: 1.1 $ $Date: 2000/01/20 06:32:51 $ */ public interface Interceptor { // ------------------------------------------------------------- Properties /** * Return the Container to which this Interceptor was added, if any. */ public Container getContainer(); /** * Set the Container to which this Interceptor is being added. This method * must be called from within the addInterceptor() method of * the specified Container. This Interceptor may refuse to become * attached to the specified Container by throwing an exception. * * @param container Container to which this Interceptor is being added * * @exception IllegalArgumentException if this Interceptor refuses to be * attached to the specified Container * @exception IllegalStateException if this Interceptor is already * attached to a different Container. */ public void setContainer(Container container); /** * Return descriptive information about this Interceptor implementation and * the corresponding version number, in the format * <description>/<version>. */ public String getInfo(); // --------------------------------------------------------- Public Methods /** * Perform pre-processing for this request. The preService() * method of all Interceptors associated with a Container are called before * the Container's service() method is called, starting with * the most recently added one, until a preService() method * returns false or throws an Exception. This method may * proceed in any of the following ways: *

* * @param request Request to be processed * @param response Response to be produced * * @return true if processing of this request and response * should continue, or false if creation of this response * has been completed * * @exception IOException if an input/output error occurred while * processing this request * @exception ServletException if a ServletException was thrown * while processing this request */ public boolean preService(Request request, Response response) throws IOException, ServletException; /** * Perform post-processing for this request. The * postService() method of all Interceptors associated with * a Container, where the preService() method was actually * called (i.e. for those Interceptors up to and including the one whose * preService() method returned false, if any), * starting with the least recently added one. *

* The postService() method may examine, but not modify, the * properties of the specified Request and Response. FIXME: Is this * requirement too restrictive?. It may, however, throw an exception, * which bypasses the call to postService() for any * remaining Interceptor associated with this Container. * * @param request Request that was processed * @param response Response that was produced * * @exception IOException if an input/output error occurred while * processing this request * @exception ServletException if a ServletException was thrown * while processing this request */ public void postService(Request request, Response response) throws IOException, ServletException; } 1.1 jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/Lifecycle.java Index: Lifecycle.java =================================================================== /* * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/Lifecycle.java,v 1.1 2000/01/20 06:32:51 craigmcc Exp $ * $Revision: 1.1 $ * $Date: 2000/01/20 06:32:51 $ * * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * * [Additional notices, if required by prior licensing conditions] * */ package org.apache.tomcat; import org.w3c.dom.Node; /** * Common interface for component life cycle methods. Tomcat components * may, but are not required to, implement this interface (as well as the * appropriate interface(s) for the functionality they support) in order to * provide a consistent mechanism to configure, start, and stop the component. *

* FIXME: Consider using the Avalon framework architecture instead. * * @author Craig R. McClanahan * @version $Revision: 1.1 $ $Date: 2000/01/20 06:32:51 $ */ public interface Lifecycle { // --------------------------------------------------------- Public Methods /** * Configure this component, based on the specified configuration * parameters. This method should be called immediately after the * component instance is created, and before start() * is called. * * @param parameters Configuration parameters for this component * (FIXME: What object type should this really be?) * * @exception IllegalStateException if this component has already been * configured and/or started * @exception LifecycleException if this component detects a fatal error * in the configuration parameters it was given */ public void configure(Node parameters) throws LifecycleException; /** * Prepare for the beginning of active use of the public methods of this * component. This method should be called after configure(), * and before any of the public methods of the component are utilized. * * @exception IllegalStateException if this component has not yet been * configured (if required for this component) * @exception IllegalStateException if this component has already been * started * @exception LifecycleException if this component detects a fatal error * that prevents this component from being used */ public void start() throws LifecycleException; /** * Gracefully terminate the active use of the public methods of this * component. This method should be the last one called on a given * instance of this component. * * @exception IllegalStateException if this component has not been started * @exception IllegalStateException if this component has already * been stopped * @exception LifecycleException if this component detects a fatal error * that needs to be reported */ public void stop() throws LifecycleException; } 1.1 jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/LifecycleException.java Index: LifecycleException.java =================================================================== /* * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/LifecycleException.java,v 1.1 2000/01/20 06:32:51 craigmcc Exp $ * $Revision: 1.1 $ * $Date: 2000/01/20 06:32:51 $ * * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * * [Additional notices, if required by prior licensing conditions] * */ package org.apache.tomcat; /** * General purpose exception that is thrown to indicate a lifecycle related * problem. Such exceptions should generally be considered fatal to the * operation of the application containing this component. *

* FIXME: Consider using the Avalon framework architecture instead. * * @author Craig R. McClanahan * @version $Revision: 1.1 $ $Date: 2000/01/20 06:32:51 $ */ public final class LifecycleException extends Exception { //------------------------------------------------------------ Constructors /** * Construct a new LifecycleException with no other information. */ public LifecycleException() { this(null, null); } /** * Construct a new LifecycleException for the specified message. * * @param message Message describing this exception */ public LifecycleException(String message) { this(message, null); } /** * Construct a new LifecycleException for the specified throwable. * * @param throwable Throwable that caused this exception */ public LifecycleException(Throwable throwable) { this(null, throwable); } /** * Construct a new LifecycleException for the specified message * and throwable. * * @param message Message describing this exception * @param throwable Throwable that caused this exception */ public LifecycleException(String message, Throwable throwable) { super(); this.message = message; this.throwable = throwable; } //------------------------------------------------------ Instance Variables /** * The error message passed to our constructor (if any) */ protected String message = null; /** * The underlying exception or error passed to our constructor (if any) */ protected Throwable throwable = null; //---------------------------------------------------------- Public Methods /** * Returns the message associated with this exception, if any. */ public String getMessage() { return (message); } /** * Returns the throwable that caused this exception, if any. */ public Throwable getThrowable() { return (throwable); } /** * Return a formatted string that describes this exception. */ public String toString() { StringBuffer sb = new StringBuffer("LifecycleException: "); if (message != null) { sb.append(message); if (throwable != null) { sb.append(": "); } } if (throwable != null) { sb.append(throwable.toString()); } return (sb.toString()); } } 1.1 jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/Loader.java Index: Loader.java =================================================================== /* * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/Loader.java,v 1.1 2000/01/20 06:32:51 craigmcc Exp $ * $Revision: 1.1 $ * $Date: 2000/01/20 06:32:51 $ * * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * * [Additional notices, if required by prior licensing conditions] * */ package org.apache.tomcat; /** * A Loader represents a Java ClassLoader implementation that can * be used by a Container to load class files (within a repository associated * with the Loader) that are designed to be reloaded upon request, as well as * a mechanism to detect whether changes have occurred in the underlying * repository. * * @author Craig R. McClanahan * @version $Revision: 1.1 $ $Date: 2000/01/20 06:32:51 $ */ public interface Loader { // ------------------------------------------------------------- Properties /** * Return the Java class loader to be used by this Container. */ public ClassLoader getClassLoader(); /** * Return the Container with which this Logger has been associated. */ public Container getContainer(); /** * Set the Container with which this Logger has been associated. * * @param container The associated Container */ public void setContainer(Container container); /** * Return descriptive information about this Loader implementation and * the corresponding version number, in the format * <description>/<version>. */ public String getInfo(); // --------------------------------------------------------- Public Methods /** * Has the internal repository associated with this Loader been modified, * such that the loaded classes should be reloaded? */ public boolean modified(); /** * Cause the underlying class loader (and therefore all of the classes * loaded by that class loader) to be thrown away, and creates a new one. */ public void reload(); } 1.1 jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/Logger.java Index: Logger.java =================================================================== /* * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/Logger.java,v 1.1 2000/01/20 06:32:51 craigmcc Exp $ * $Revision: 1.1 $ * $Date: 2000/01/20 06:32:51 $ * * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * * [Additional notices, if required by prior licensing conditions] * */ package org.apache.tomcat; /** * A Logger is a generic interface for the message and exception * logging methods of the ServletContext interface. Loggers can be * attached at any Container level, but will typically only be attached * to a Context, or higher level, Container. * * @author Craig R. McClanahan * @version $Revision: 1.1 $ $Date: 2000/01/20 06:32:51 $ */ public interface Logger { // ------------------------------------------------------------- Properties /** * Return the Container with which this Logger has been associated. */ public Container getContainer(); /** * Set the Container with which this Logger has been associated. * * @param container The associated Container */ public void setContainer(Container container); /** * Return descriptive information about this Logger implementation and * the corresponding version number, in the format * <description>/<version>. */ public String getInfo(); // --------------------------------------------------------- Public Methods /** * Writes the specified message to a servlet log file, usually an event * log. The name and type of the servlet log is specific to the * servlet container. * * @param msg A String specifying the message to be written * to the log file */ public void log(String msg); /** * Writes the specified exception, and message, to a servlet log file. * The implementation of this method should call * log(msg, exception) instead. This method is deprecated * in the ServletContext interface, but not deprecated here to avoid * many useless compiler warnings. * * @param exception An Exception to be reported * @param msg The associated message string */ public void log(Exception exception, String msg); /** * Writes an explanatory message and a stack trace for a given * Throwable exception to the servlet log file. The name * and type of the servlet log file is specific to the servlet container, * usually an event log. * * @param message A String that describes the error or * exception * @param throwable The Throwable error or exception */ public void log(String message, Throwable throwable); } 1.1 jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/Manager.java Index: Manager.java =================================================================== /* * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/Manager.java,v 1.1 2000/01/20 06:32:51 craigmcc Exp $ * $Revision: 1.1 $ * $Date: 2000/01/20 06:32:51 $ * * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * * [Additional notices, if required by prior licensing conditions] * */ package org.apache.tomcat; import java.io.IOException; import javax.servlet.http.Cookie; import javax.servlet.http.HttpSession; /** * A Manager manages the pool of Sessions that are associated with a * particular Container. Different Manager implementations may support * value-added features such as the persistent storage of session data, * as well as migrating sessions for distributable web applications. * * @author Craig R. McClanahan * @version $Revision: 1.1 $ $Date: 2000/01/20 06:32:51 $ */ public interface Manager { // ------------------------------------------------------------- Properties /** * Return the Container with which this Manager is associated. */ public Container getContainer(); /** * Set the Container with which this Manager is associated. * * @param container The newly associated Container */ public void setContainer(Container container); /** * Return the distributable flag for the sessions supported by * this Manager. */ public boolean getDistributable(); /** * Set the distributable flag for the sessions supported by this * Manager. If this flag is set, all user data objects added to * sessions associated with this manager must implement Serializable. * * @param distributable The new distributable flag */ public void setDistributable(boolean distributable); /** * Return descriptive information about this Manager implementation and * the corresponding version number, in the format * <description>/<version>. */ public String getInfo(); /** * Return the default maximum inactive interval (in seconds) * for Sessions created by this Manager. */ public int getMaxInactiveInterval(); /** * Set the default maximum inactive interval (in seconds) * for Sessions created by this Manager. * * @param interval The new default value */ public void setMaxInactiveInterval(int interval); // --------------------------------------------------------- Public Methods /** * Construct and return a new session object, based on the default * settings specified by this Manager's properties. The session * id will be assigned by this method, and available via the getId() * method of the returned session. If a new session cannot be created * for any reason, return null. * * @exception IllegalStateException if a new session cannot be * instantiated for any reason */ public Session createSession(); /** * Return the active Session, associated with this Manager, with the * specified session id (if any); otherwise return null. * * @param id The session id for the session to be returned * * @exception ClassNotFoundException if a deserialization error occurs * while processing this request * @exception IllegalStateException if a new session cannot be * instantiated for any reason * @exception IOException if an input/output error occurs while * processing this request */ public Session findSession(String id) throws IOException; /** * Return the set of active Sessions associated with this Manager. * If this Manager has no active Sessions, a zero-length array is returned. */ public Session[] findSessions(); }