KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > javacoding > jspider > api > event > monitor > ThreadPoolMonitorEvent


1 package net.javacoding.jspider.api.event.monitor;
2
3 /**
4  * $Id: ThreadPoolMonitorEvent.java,v 1.3 2003/03/28 17:26:26 vanrogu Exp $
5  */

6 public class ThreadPoolMonitorEvent extends MonitorEvent {
7
8     protected String JavaDoc name;
9     protected int occupationPct;
10     protected int idlePct;
11     protected int blockedPct;
12     protected int busyPct;
13     protected int size;
14
15     public ThreadPoolMonitorEvent ( String JavaDoc name, int occupationPct, int idlePct, int blockedPct, int busyPct, int size ) {
16         this.name = name;
17         this.occupationPct = occupationPct;
18         this.idlePct = idlePct;
19         this.blockedPct = blockedPct;
20         this.busyPct = busyPct;
21         this.size = size;
22     }
23
24     public String JavaDoc toString() {
25         return "ThreadPool " + getName() + " occupation:" + (getOccupationPct()) + "% [idle: " + getIdlePct() + "%, blocked: " + getBlockedPct() + "%, busy: " + getBusyPct() + "%], size: " + getSize();
26     }
27
28     public String JavaDoc getComment() {
29         return toString();
30     }
31
32     public String JavaDoc getName() {
33         return name;
34     }
35
36     public int getOccupationPct() {
37         return occupationPct;
38     }
39
40     public int getIdlePct() {
41         return idlePct;
42     }
43
44     public int getBlockedPct() {
45         return blockedPct;
46     }
47
48     public int getBusyPct() {
49         return busyPct;
50     }
51
52     public int getSize() {
53         return size;
54     }
55
56 }
57
Popular Tags