1 /* ==========================================
2 * JperfProbe : Java Performance Probes
3 * ==========================================
4 *
5 * Project Info: http://jperfprobe.sourceforge.net/
6 * Project Lead: Tor-Erik Larsen (http://sourceforge.net/users/uptime62)
7 *
8 * (C) Copyright 2005, by Tor-Erik Larsen and Contributors.
9 *
10 * This library is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU Lesser General Public License as published by
12 * the Free Software Foundation; either version 2.1 of the License, or
13 * (at your option) any later version.
14 *
15 * This library is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18 * License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with this library; if not, write to the Free Software Foundation, Inc.,
22 * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
23 */
24 package net.sf.jperfprobe;
25
26 public interface Probe {
27
28 /**
29 * Get the name of the probe
30 * @return name
31 */
32 String getName();
33
34 /**
35 * Get the thread name of the probe
36 * @return threadname
37 */
38 //String getThreadName();
39 /**
40 * Get last elapsed time of this probe.
41 *
42 * @return elapsed time
43 */
44 long getElapsed();
45
46 /**
47 * Start the probe.
48 */
49 void start();
50
51 /**
52 * Stop the probe.
53 */
54 void stop();
55
56 /**
57 * Is the probe enabled.
58 *
59 * @return enabled flag
60 */
61 boolean isEnabled();
62
63 /**
64 * Enable the probe.
65 */
66 void enable();
67
68 /**
69 * Disable the probe.
70 */
71 void disable();
72
73 /**
74 * Is the probe running (by start).
75 *
76 * @return running flag
77 */
78 boolean isRunning();
79 }