KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jmeter > visualizers > MonitorStats


1 // $Header: /home/cvs/jakarta-jmeter/src/monitor/components/org/apache/jmeter/visualizers/MonitorStats.java,v 1.3 2004/03/13 23:16:07 sebb Exp $
2
/*
3  * Copyright 2004 The Apache Software Foundation.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17 package org.apache.jmeter.visualizers;
18
19 import java.io.Serializable JavaDoc;
20
21 public class MonitorStats implements Serializable JavaDoc
22 {
23
24     public int health;
25     public int load;
26     public int cpuload;
27     public int memload;
28     public int threadload;
29     public String JavaDoc host;
30     public String JavaDoc port;
31     public String JavaDoc protocol;
32     public long timestamp;
33     
34     /**
35      *
36      */

37     public MonitorStats()
38     {
39         super();
40     }
41     
42     /**
43      * Default constructor
44      * @param health
45      * @param load
46      * @param cpuload
47      * @param memload
48      * @param threadload
49      * @param host
50      * @param port
51      * @param protocol
52      * @param time
53      */

54     public MonitorStats(int health,
55         int load,
56         int cpuload,
57         int memload,
58         int threadload,
59         String JavaDoc host,
60         String JavaDoc port,
61         String JavaDoc protocol,
62         long time){
63             this.health = health;
64             this.load = load;
65             this.cpuload = cpuload;
66             this.memload = memload;
67             this.threadload = threadload;
68             this.host = host;
69             this.port = port;
70             this.protocol = protocol;
71             this.timestamp = time;
72         }
73
74     /**
75      * For convienance, this method returns the protocol,
76      * host and port as a URL.
77      * @return protocol://host:port
78      */

79     public String JavaDoc getURL(){
80         return protocol + "://" + host + ":" + port;
81     }
82 }
83
Popular Tags