package org.apache.avalon.phoenix.launcher;

/**
 * @author sshort
 *
 * To change this generated comment edit the template variable "typecomment":
 * Window>Preferences>Java>Templates.
 * To enable and disable the creation of type comments go to
 * Window>Preferences>Java>Code Generation.
 */
public interface JMXLauncherMBean {
    String OBJECT_NAME = "Phoenix:service=Launcher";

   // Constants -----------------------------------------------------

   String[] states = { "Stopped", "Stopping", "Starting", "Started", "Failed" };

   int STOPPED  = 0;
   int STOPPING = 1;
   int STARTING = 2;
   int STARTED  = 3;
   int FAILED  = 4;

   	/**
   	 * Return MBean state as an int
   	 */
   	int getState();
   	
   	/**
   	 * Return MBean state as a String
   	 */
   	String getStateString();

   	/**
   	 * create the service, do expensive operations etc
   	 */
   	void create() throws Exception;

	/**
     * start the service, create is already called
     */
   	void start() throws Exception;

   	/**
     * stop the service
     */
   	void stop();

   	/**
     * destroy the service, tear down
     */
	void destroy();
   
   	/**
     * Accessors for phoenix home directory
     */
    public void setPhoenixHome(String value);
    public String getPhoenixHome();

   	/**
     * Accessors for phoenix config file
     */
    public void setPhoenixConfigFile(String value);
    public String getPhoenixConfigFile();

   	/**
     * Accessors for phoenix applications directory
     */
    public void setAppsPath(String value);
    public String getAppsPath();

   	/**
     * Accessors for phoenix log file name
     */
    public void setLogFilename(String value);
    public String getLogFilename();

   	/**
     * Accessors for phoenix debug flag
     */
    public void setPhoenixDebug (String value);
    public String getPhoenixDebug ();
}
