You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by pi...@locus.apache.org on 2000/09/21 11:22:35 UTC
cvs commit: jakarta-tomcat-4.0/invocation/src/share/org/apache/invocation InvocationAbstraction.java InvocationException.java
pier 00/09/21 02:22:34
Added: invocation/src/native/windows/resources menu-quit.bmp
menu-restart.bmp menu-start.bmp menu-stop.bmp
tomcat.ico tray-default.ico tray-running.ico
tray-stopped.ico
invocation/src/share/org/apache/invocation
InvocationAbstraction.java InvocationException.java
Log:
Added resources and interfaces for native invocation libraries ant tools.
Revision Changes Path
1.1 jakarta-tomcat-4.0/invocation/src/native/windows/resources/menu-quit.bmp
<<Binary file>>
1.1 jakarta-tomcat-4.0/invocation/src/native/windows/resources/menu-restart.bmp
<<Binary file>>
1.1 jakarta-tomcat-4.0/invocation/src/native/windows/resources/menu-start.bmp
<<Binary file>>
1.1 jakarta-tomcat-4.0/invocation/src/native/windows/resources/menu-stop.bmp
<<Binary file>>
1.1 jakarta-tomcat-4.0/invocation/src/native/windows/resources/tomcat.ico
<<Binary file>>
1.1 jakarta-tomcat-4.0/invocation/src/native/windows/resources/tray-default.ico
<<Binary file>>
1.1 jakarta-tomcat-4.0/invocation/src/native/windows/resources/tray-running.ico
<<Binary file>>
1.1 jakarta-tomcat-4.0/invocation/src/native/windows/resources/tray-stopped.ico
<<Binary file>>
1.1 jakarta-tomcat-4.0/invocation/src/share/org/apache/invocation/InvocationAbstraction.java
Index: InvocationAbstraction.java
===================================================================
/* ========================================================================= *
* *
* The Apache Software License, Version 1.1 *
* *
* Copyright (c) 1999, 2000 The Apache Software Foundation. *
* All rights reserved. *
* *
* ========================================================================= *
* *
* Redistribution and use in source and binary forms, with or without modi- *
* fication, are permitted provided that the following conditions are met: *
* *
* 1. Redistributions of source code must retain the above copyright notice *
* 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 <ap...@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 Software Foundation. *
* *
* 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 indivi- *
* duals on behalf of the Apache Software Foundation. For more information *
* on the Apache Software Foundation, please see <http://www.apache.org/>. *
* *
* ========================================================================= */
/* CVS information: $Revision: 1.1 $ $Date: 2000/09/21 09:22:33 $ $Author: pier $
* $Source: /home/cvs/jakarta-tomcat-4.0/invocation/src/share/org/apache/invocation/InvocationAbstraction.java,v $
*/
package org.apache.invocation;
/**
* The <code>InvocationAbstraction</code> interface defines how a generic
* service is invoked by the native layer handling operating system calls
* and signals.
* <br><br>
* The methods are called in the following order:
* <br><br>
* <table width="100%">
* <tr>
* <td width="5%"></td>
* <td>
* <table border="1" cellpadding="3" cellspacing="0" width="100%">
* <tr bgcolor="#eeeeff" class="TableSubHeadingColor">
* <td><b>Method</b></td>
* <td><b>Description</b></td>
* </tr>
* <tr bgcolor="#ffffff" class="TableRowColor">
* <td><code>start (...)</code></td>
* <td>
* Called once when the virtual machine is started to initialize
* the <code>InvocationAbstraction</code> instance with the parameters
* specified on the command line, and to start the service.
* </td>
* </tr>
* <tr bgcolor="#ffffff" class="TableRowColor">
* <td><code>restart ()</code></td>
* <td>
* Called multiple times to start the service. The application should
* stop the service, reload its configurations, and start the service
* back again.
* </td>
* </tr>
* <tr bgcolor="#ffffff" class="TableRowColor">
* <td><code>stop ()</code></td>
* <td>
* Called once before the virtual machine is shut down to allow the
* application to properly halt the service.
* </td>
* </tr>
* </table>
* </td>
* <td width="5%"></td>
* </tr>
* </table>
*
* @author <a href="mailto:pier.fumagalli@eng.sun.com">Pier Fumagalli</a>
* @author Copyright © 1999-2000 <a href="http://www.apache.org">The
* Apache Software Foundation</a>
* @version CVS $Revision: 1.1 $ $Date: 2000/09/21 09:22:33 $
*/
public interface InvocationAbstraction {
/**
* Initialize this <code>InvocationAbstraction</code> instance with the
* parameters specified on the command line and start the service.
*
* @param args A <code>String</code> array containing the command line
* parameters.
* @exception InvocationException The service cannot be started. When this
* exception is thrown the virtual machine
* is shut down.
*/
public boolean start(String args[])
throws InvocationException;
/**
* Restart the service handled by this <code>InvocationAbstraction</code>
* instance.
* <br>
* This method is called when a restart signal is detected, meaning that
* the service should be stopped, disk configuration reloaded, and the
* servoce restarted.
*
* @exception InvocationException The service cannot be restarted. When
* this exception is thrown the virtual
* machine is shut down.
*/
public boolean restart()
throws InvocationException;
/**
* Stop the service handled by this <code>InvocationAbstraction</code>
* instance.
*
* @param args A <code>String</code> array containing the command line
* parameters.
* @exception InvocationException The service cannot be properly stopped.
* When this exception is thrown the virtual
* machine is shut down.
*/
public boolean stop()
throws InvocationException;
}
1.1 jakarta-tomcat-4.0/invocation/src/share/org/apache/invocation/InvocationException.java
Index: InvocationException.java
===================================================================
/* ========================================================================= *
* *
* The Apache Software License, Version 1.1 *
* *
* Copyright (c) 1999, 2000 The Apache Software Foundation. *
* All rights reserved. *
* *
* ========================================================================= *
* *
* Redistribution and use in source and binary forms, with or without modi- *
* fication, are permitted provided that the following conditions are met: *
* *
* 1. Redistributions of source code must retain the above copyright notice *
* 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 <ap...@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 Software Foundation. *
* *
* 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 indivi- *
* duals on behalf of the Apache Software Foundation. For more information *
* on the Apache Software Foundation, please see <http://www.apache.org/>. *
* *
* ========================================================================= */
/* CVS information: $Revision: 1.1 $ $Date: 2000/09/21 09:22:34 $ $Author: pier $
* $Source: /home/cvs/jakarta-tomcat-4.0/invocation/src/share/org/apache/invocation/InvocationException.java,v $
*/
package org.apache.invocation;
/**
* An <code>InvocationException</code> is thrown whenever a method specified
* in the <code>InvocationAbstraction</code> interface cannot be executed
* successfully.
* <br>
* It is advised to always specify a detail message when constructing a new
* instance of this exception.
*
* @see InvocationAbstraction
* @author <a href="mailto:pier.fumagalli@eng.sun.com">Pier Fumagalli</a>
* @author Copyright © 1999-2000 <a href="http://www.apache.org">The
* Apache Software Foundation</a>
* @version CVS $Revision: 1.1 $ $Date: 2000/09/21 09:22:34 $
*/
public class InvocationException extends Exception {
/**
* Construct a new instance of an <code>InvocationException</code> with
* no detail message.
* <br>
* Avoid using this constructor as it doesn't provide any detail message
* describing why the exception was thrown.
*/
public InvocationException() {
super("[no message]");
}
/**
* Construct a new instance of an <code>InvocationException</code> with
* the specified detail message.
*
* @param m This exception detail message.
*/
public InvocationException(String m) {
super(m);
}
}