1 /*** 2 * Fractal JMX 3 * Copyright (C) 2003 France Telecom R&D 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public 7 * License as published by the Free Software Foundation; either 8 * version 2 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public 16 * License along with this library; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * 19 * Contact: fractal@objectweb.org 20 */ 21 package org.objectweb.fractal.jmx.julia.stat; 22 23 /** 24 * An interface for observing method calls. 25 * More precisely, a controller implementing this interface returns the number and the rate 26 * of method calls that have been made on the server interfaces of a component 27 * (control interfaces excluded). 28 * 29 * @version 0.1 30 */ 31 public interface StatController { 32 33 /** 34 * Gets the number of method calls. 35 * 36 * @return the number of method calls that have been made on the server 37 * interfaces of the component (control interfaces excluded). 38 */ 39 int getNumberOfMethodCall(); 40 41 /** 42 * Gets the number of method calls that have "succeded". 43 * 44 * @return the number of method calls that have been made on the server 45 * interfaces of the component (control interfaces excluded), and that have 46 * "succeded", i.e., that have not thrown an exception. 47 */ 48 int getNumberOfMethodSuccess(); 49 50 /** 51 * Gets the rate of method calls. 52 * 53 * @return the rate of method calls (number / second) that have been made on the server 54 * interfaces of the component (control interfaces excluded). 55 */ 56 double getRateOfMethodCall(); 57 58 /** 59 * Gets the rate of method calls that have "succeded". 60 * 61 * @return the rate of method calls (number / second) that have been made on the server 62 * interfaces of the component (control interfaces excluded), and that have 63 * "succeded", i.e., that have not thrown an exception. 64 */ 65 double getRateOfMethodSuccess(); 66 67 /** 68 * Resets (to zero) the values returned by this controller. 69 */ 70 void reset(); 71 } 72 73