001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.monitoring.jmx;
016    
017    import com.liferay.portal.kernel.exception.SystemException;
018    import com.liferay.portal.kernel.util.MethodKey;
019    
020    import java.util.Set;
021    
022    /**
023     * @author Michael C. Han
024     */
025    public interface ServiceManagerMBean {
026    
027            public void addMonitoredClass(String className);
028    
029            public void addMonitoredMethod(
030                            String className, String methodName, String[] parameterTypes)
031                    throws SystemException;
032    
033            public long getErrorCount(
034                            String className, String methodName, String[] parameterTypes)
035                    throws SystemException;
036    
037            public long getMaxTime(
038                            String className, String methodName, String[] parameterTypes)
039                    throws SystemException;
040    
041            public long getMinTime(
042                            String className, String methodName, String[] parameterTypes)
043                    throws SystemException;
044    
045            public Set<String> getMonitoredClasses();
046    
047            public Set<MethodKey> getMonitoredMethods();
048    
049            public long getRequestCount(
050                            String className, String methodName, String[] parameterTypes)
051                    throws SystemException;
052    
053            public boolean isActive();
054    
055            public boolean isPermissiveMode();
056    
057            public void setActive(boolean active);
058    
059            public void setPermissiveMode(boolean permissiveMode);
060    
061    }