001: /**
002: * JOnAS: Java(TM) Open Application Server
003: * Copyright (C) 1999 Bull S.A.
004: * Contact: jonas-team@objectweb.org
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2.1 of the License, or any later version.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public
017: * License along with this library; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
019: * USA
020: *
021: * Initial developer(s): Florent BENOIT & Ludovic BERT
022: * --------------------------------------------------------------------------
023: * $Id: EarServiceImplMBean.java 4623 2004-04-19 14:28:04Z benoitf $
024: * --------------------------------------------------------------------------
025: */package org.objectweb.jonas.ear;
026:
027: import java.util.List;
028: import java.util.Set;
029:
030: /**
031: * JOnAS EAR Service MBean interface. This interface provides a description for
032: * the EAR service management.
033: * @author Florent Benoit
034: * @author Ludovic Bert
035: */
036:
037: public interface EarServiceImplMBean {
038:
039: /**
040: * Deploy an EAR, used by the JMX Management.
041: * @param fileName the fileName of the ear which must be be deployed.
042: * @return The ObjectName of the MBean associated to the deployed J2EE
043: * Application
044: * @throws Exception if the deployment of the EAR failed.
045: */
046: String deployEarMBean(String fileName) throws Exception;
047:
048: /**
049: * Undeploy an EAR, used by the JMX Management.
050: * @param fileName the fileName of the ear which must be be undeployed.
051: * @throws Exception if the undeployment of the EAR failed.
052: */
053: void unDeployEarMBean(String fileName) throws Exception;
054:
055: /**
056: * @return current number of ears deployed in the JOnAS server
057: */
058: Integer getCurrentNumberOfEars();
059:
060: /**
061: * Return the list of installed Applications. The EAR files or the
062: * directories with expanded Applications are searched in JONAS_BASE/apps
063: * and all Applications directories 'autoload'.
064: * @return The list of EAR files or the directories with expanded
065: * Applications found
066: * @throws Exception if the list can't be retrieved
067: */
068: List getInstalledEars() throws Exception;
069:
070: /**
071: * This method is added temporarily. It will disapear when Ears will have
072: * their associated MBeans (when Ears will become manageable)
073: * @return the names of the ears currently deployed in the JOnAS server
074: */
075: Set getEarNames();
076:
077: /**
078: * Test if the specified filename is already deployed or not
079: * @param fileName the name of the ear file.
080: * @return true if the ear is deployed, else false.
081: */
082: boolean isEarLoaded(String fileName);
083:
084: /**
085: * Return the list of all loaded Applications.
086: * @return The list of deployed Applications
087: */
088: List getDeployedEars();
089:
090: /**
091: * Return the list of installed Applications ready to deploy.
092: * @return The list of deployable Applications
093: * @throws Exception if the list of deployable ears can't be returned
094: */
095: List getDeployableEars() throws Exception;
096:
097: /**
098: * Return the list of "autoload" directories for web applications.
099: * @return The list of all "autoload" directories
100: */
101: List getAutoloadDirectories();
102:
103: /**
104: * Return the Apps directory.
105: * @return The Apps directory
106: */
107: String getAppsDirectory();
108:
109: }
|