/*
 * The contents of this file are subject to the terms 
 * of the Common Development and Distribution License 
 * (the License).  You may not use this file except in
 * compliance with the License.
 * 
 * You can obtain a copy of the license at 
 * https://glassfish.dev.java.net/public/CDDLv1.0.html or
 * glassfish/bootstrap/legal/CDDLv1.0.txt.
 * See the License for the specific language governing 
 * permissions and limitations under the License.
 * 
 * When distributing Covered Code, include this CDDL 
 * Header Notice in each file and include the License file 
 * at glassfish/bootstrap/legal/CDDLv1.0.txt.  
 * If applicable, add the following below the CDDL Header, 
 * with the fields enclosed by brackets [] replaced by
 * you own identifying information: 
 * "Portions Copyrighted [year] [name of copyright owner]"
 * 
 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
 */
 
/*
 */

package com.sun.appserv.management.monitor;

import java.util.Map;

import com.sun.appserv.management.base.XTypes;
import com.sun.appserv.management.base.Container;

import javax.management.j2ee.statistics.EJBStats;
import javax.management.j2ee.statistics.StatelessSessionBeanStats;
import javax.management.j2ee.statistics.StatefulSessionBeanStats;
import javax.management.j2ee.statistics.EntityBeanStats;
import javax.management.j2ee.statistics.MessageDrivenBeanStats;


/**
	Base monitoring interface for EJBs.
	@see StatelessSessionBeanMonitor
	@see StatefulSessionBeanMonitor
	@see EntityBeanMonitor
	@see MessageDrivenBeanMonitor
 */
public interface BeanMonitor extends Container, MonitoringStats
{
    /**
		@return the associated bean pool monitor object 
	 */
	public BeanPoolMonitor		getBeanPoolMonitor( );
	
	/**
		@return the associated bean cache monitor object
	 */
	public BeanCacheMonitor		getBeanCacheMonitor( );
        
	/**
		@return Map of BeanMethodMonitorMgr keyed by name (beanName), one per
		bean in this EJBModule
	 */
	public Map<String,BeanMethodMonitor>	getBeanMethodMonitorMap( );

	/**
		Return the specific sub-interface of EJBStats appropriate to this item.
		Depending on the type of bean, the EJBStats returned will be one of:
		<ul>
		<li>{@link StatelessSessionBeanStats}</li>
		<li>{@link StatefulSessionBeanStats}</li>
		<li>{@link EntityBeanStats}</li>
		<li>{@link MessageDrivenBeanStats}</li>
		</ul>
	 */
	public EJBStats	getEJBStats();
}
