/*
 * 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.container;

import java.util.Set;
import java.rmi.RemoteException;

/**
 * MBean Interface for EJB Service Management
 * MBean type: Standard
 * MBean model: Inheritance (EJBServiceImpl)
 */
public interface EJBServiceImplMBean {

    /**
     * @return Integer Total Number of Container actually in JOnAS
     */ 
    public Integer getCurrentNumberOfContainer();

    /**
     * @return Integer Total Number of Bean Type actually in JOnAS
     */ 
    public Integer getTotalCurrentNumberOfBeanType();

    /**
     * @return Integer Total Number of Bmp Type actually in JOnAS
     */
    public Integer getTotalCurrentNumberOfBMPType();

    /**
     * @return Integer Total Number of Cmp Type actually in JOnAS
     */
    public Integer getTotalCurrentNumberOfCMPType();

    /**
     * @return Integer Total Number of Sbf Type actually in JOnAS
     */
    public Integer getTotalCurrentNumberOfSBFType();

    /**
     * @return Integer Total Number of Sbl Type actually in JOnAS
     */
    public Integer getTotalCurrentNumberOfSBLType();

    /**
     * @return Integer Total Number of Mdb Type actually in JOnAS
     */
    public Integer getTotalCurrentNumberOfMDBType();

    /**
     * MBean method
     * @return all ejb Name using this datasource (with  there container name)
     */
    public Set getDataSourceDependence(String dsName);

    /**
     * MBean method
     * @return all ejb Name using this destination (with  there container name)
     */
    public Set getJmsDestinationDependence(String dsName);

    /**
     * MBean method
     * @return all ejb Name using this Connection Factory (with  there container name)
     */
    public Set getJmsConnectionFactoryDependence(String cfName);

    /**
     * remove a container application
     * @param String ContainerName, the Name of this container
     */
    public void removeContainer(String fileName);

    /**
     * Start (or restart if allready start) a new container application
     * @param String ejbJarFile, the Name of the ejbJarFile for this container application
     */
    public void createContainer(String ejbJarFile) throws RemoteException;
     


    /**
     * Synchronized all entity bean containers
     */
    public void syncAllEntities();
}
