Return-Path: Delivered-To: apmail-jakarta-avalon-cvs-archive@apache.org Received: (qmail 86110 invoked from network); 2 Dec 2001 05:31:21 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 2 Dec 2001 05:31:21 -0000 Received: (qmail 1726 invoked by uid 97); 2 Dec 2001 05:31:32 -0000 Delivered-To: qmlist-jakarta-archive-avalon-cvs@jakarta.apache.org Received: (qmail 1710 invoked by uid 97); 2 Dec 2001 05:31:31 -0000 Mailing-List: contact avalon-cvs-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Avalon CVS List" Reply-To: "Avalon Developers List" Delivered-To: mailing list avalon-cvs@jakarta.apache.org Received: (qmail 1699 invoked by uid 97); 2 Dec 2001 05:31:31 -0000 Date: 2 Dec 2001 05:13:32 -0000 Message-ID: <20011202051332.43194.qmail@icarus.apache.org> From: donaldp@apache.org To: jakarta-avalon-phoenix-cvs@apache.org Subject: cvs commit: jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/interfaces ApplicationException.java ApplicationMBean.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N donaldp 01/12/01 21:13:32 Added: src/java/org/apache/avalon/phoenix/interfaces ApplicationException.java ApplicationMBean.java Log: First cut at making a Management interface for Applications. Revision Changes Path 1.1 jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/interfaces/ApplicationException.java Index: ApplicationException.java =================================================================== /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package org.apache.avalon.phoenix.interfaces; import org.apache.avalon.framework.CascadingException; /** * Exception to indicate that an Application failed to * startup or shutdown cleanly. * * @author Peter Donald */ public final class ApplicationException extends CascadingException { /** * Construct a new ApplicationException instance. * * @param message The detail message for this exception. */ public ApplicationException( final String message ) { this( message, null ); } /** * Construct a new ApplicationException instance. * * @param message The detail message for this exception. * @param throwable the root cause of the exception */ public ApplicationException( final String message, final Throwable throwable ) { super( message, throwable ); } } 1.1 jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/interfaces/ApplicationMBean.java Index: ApplicationMBean.java =================================================================== /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package org.apache.avalon.phoenix.interfaces; /** * This is the interface via which you can manager * the root container of Applications. * * @author Peter Donald */ public interface ApplicationMBean { String ROLE = "org.apache.avalon.phoenix.interfaces.ApplicationMBean"; /** * Get the name of the application. * * @return the name of the application */ String getName(); /** * Get the name to display in Management UI. * * @return the name of the application to display in UI */ String getDisplayName(); /** * Get the string used to describe the application in the UI. * * @return a short description of the application */ String getDescription(); /** * Get location of Application installation * * @return the home directory of application */ String getHomeDirectory(); /** * Return true if the application is * running or false otherwise. * * @return true if application is running, false otherwise */ boolean isRunning(); /** * Start the application running. * This is only valid when isRunning() returns false, * otherwise it will generate an IllegalStateException. * * @exception IllegalStateException if application is already running * @exception ApplicationException if the application failed to start. * the message part of exception will contain more information * pertaining to why the application failed to startup */ void start() throws IllegalStateException, ApplicationException; /** * Shutdown and restart the application running. * This is only valid when isRunning() returns true, * otherwise it will generate an IllegalStateException. * This is equivelent to calling start() and then stop() * in succession. * * @exception IllegalStateException if application is not already running * @exception ApplicationException if the application failed to stop or start. * the message part of exception will contain more information * pertaining to why the application failed to startup/shutdown */ void restart() throws IllegalStateException, ApplicationException; /** * Stop the application running. * This is only valid when isRunning() returns true, * otherwise it will generate an IllegalStateException. * * @exception IllegalStateException if application is not already running * @exception ApplicationException if the application failed to shutdown. * the message part of exception will contain more information * pertaining to why the application failed to shutodwn */ void stop() throws IllegalStateException, ApplicationException; /** * Uninstall the application. * This is only valid when isRunning() returns false, * otherwise it will generate an IllegalStateException. * * @exception IllegalStateException if application is running * @exception ApplicationException if the application failed to undeploy. * the message part of exception will contain more information * pertaining to why the application failed to undeploy */ void undeploy() throws IllegalStateException, ApplicationException; } -- To unsubscribe, e-mail: For additional commands, e-mail: