01: package net.javacoding.jspider.api.event.monitor;
02:
03: /**
04: * $Id: ThreadPoolMonitorEvent.java,v 1.3 2003/03/28 17:26:26 vanrogu Exp $
05: */
06: public class ThreadPoolMonitorEvent extends MonitorEvent {
07:
08: protected String name;
09: protected int occupationPct;
10: protected int idlePct;
11: protected int blockedPct;
12: protected int busyPct;
13: protected int size;
14:
15: public ThreadPoolMonitorEvent(String name, int occupationPct,
16: int idlePct, int blockedPct, int busyPct, int size) {
17: this .name = name;
18: this .occupationPct = occupationPct;
19: this .idlePct = idlePct;
20: this .blockedPct = blockedPct;
21: this .busyPct = busyPct;
22: this .size = size;
23: }
24:
25: public String toString() {
26: return "ThreadPool " + getName() + " occupation:"
27: + (getOccupationPct()) + "% [idle: " + getIdlePct()
28: + "%, blocked: " + getBlockedPct() + "%, busy: "
29: + getBusyPct() + "%], size: " + getSize();
30: }
31:
32: public String getComment() {
33: return toString();
34: }
35:
36: public String getName() {
37: return name;
38: }
39:
40: public int getOccupationPct() {
41: return occupationPct;
42: }
43:
44: public int getIdlePct() {
45: return idlePct;
46: }
47:
48: public int getBlockedPct() {
49: return blockedPct;
50: }
51:
52: public int getBusyPct() {
53: return busyPct;
54: }
55:
56: public int getSize() {
57: return size;
58: }
59:
60: }
|