/*
 * JOnAS: Java(TM) Open Application Server
 * Copyright (C) 1999 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
 *
 * Initial developer(s): ____________________________________.
 * Contributor(s): Michel Bruno and Guillaume Riviere
 *
 * --------------------------------------------------------------------------
 * $Id$
 * --------------------------------------------------------------------------
 */
package org.objectweb.jonas.server;

import java.rmi.RemoteException;
/**
 * MBean Interface for Server Management
 * MBean type: Standard
 * MBean model: Delegate
 */
public interface JmxServerMBean {

    /**
     * Server name
     * @return String JOnAS server name
     */
    public String getJonasName();

    /**
     * Server version
     * @return String JOnAS server version
     */
    public String getJonasVersion();

    /**
     * Server ORB
     * @return String JOnAS server ORB (Jeremie or Rmi)
     */
    public String getJonasORB();

    /**
     * Stop server
     */
    public void stop() throws RemoteException;

    /**
     * run the garbage collector
     */
    public void runGC() throws RemoteException;


    // Monitoring part

    /**
     * get jvm free memory
     */
    public Long getCurrentUsedMemory() throws RemoteException;

    /**
     * get jvm total memory
     */
    public Long getCurrentTotalMemory() throws RemoteException;

    /**
     * get/set  for free memory measurement
     */
    public void setRange(Integer range) throws RemoteException;
    public Integer getRange()throws RemoteException;

    /**
     * get/set number of measures
     */
    public void setNumberOfMeasures(Integer range)throws RemoteException;
    public Integer getNumberOfMeasures()throws RemoteException;

    /**
     * set monitoring activation
     */
    public void setActivated(Boolean act);

    /**
     * get monitoring activation
     */
    public Boolean getActivated();


    /**
     * get the table of value
     */
    public Long[] getMeasuresTable()throws RemoteException;

}
