/**
 * JOnAS: Java(TM) Open Application Server
 * Copyright (C) 2006 Bull S.A.
 * Contact: jonas-team@objectweb.org
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
 * USA
 *
 * --------------------------------------------------------------------------
 * $Id$
 * --------------------------------------------------------------------------
 */
package org.objectweb.jonas.management.monitoring;


/**
 * Implements MBean interface for domain monitoring
 * @author Adriana Danes
 */
public interface DomainMonitorMBean {
    /**
     * @return Array of OBJECT_NAMEs of all ServerProxy MBeans
     */
    String[] getProxys();
    /**
     * @return Array of OBJECT_NAMEs of all cluster MBeans
     */
    String[] getClusters();
    /**
     * @param sec monitoring period
     */
    void setMonitoringPeriod(int sec);
    /**
     * @return the monitoring period in sec
     */
    int getMonitoringPeriod();

    /**
     * Get the list of server where a file is being deployed
     * @param filename file to deploy
     * @return server name
     */
    String [] getDeployServers(String filename);

    /**
     * Get the current state (string form) of deployment operation
     * @param filename file to deploy
     * @param servername server where deployment is done
     * @return one of "progress","ok","fail"
     */
    String getDeployState(String filename, String servername);

    /**
     * Get the error message associated to the error state
     * @param filename file to deploy
     * @param servername server where deployment is done
     * @return error message
     */
    String getErrorMessage(String filename, String servername);

    /**
     * Forget all deploy information
     */
    void forgetAllDeploy();
}
