KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tctest > performance > http > load > ResponseStatistic


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright
3  * notice. All rights reserved.
4  */

5 package com.tctest.performance.http.load;
6
7 import java.io.Serializable JavaDoc;
8
9 final class ResponseStatistic implements Serializable JavaDoc {
10
11   private final long startTime;
12   private final long endTime;
13   private final String JavaDoc url;
14   private final int statusCode;
15
16   public ResponseStatistic(long startTime, long endTime, String JavaDoc url, int statusCode) {
17     this.startTime = startTime;
18     this.endTime = endTime;
19     this.url = url;
20     this.statusCode = statusCode;
21   }
22
23   public int duration() {
24     return (int) (endTime - startTime);
25   }
26
27   public String JavaDoc url() {
28     return url;
29   }
30
31   public int statusCode() {
32     return statusCode;
33   }
34
35   public long startTime() {
36     return startTime;
37   }
38
39   public long endTime() {
40     return endTime;
41   }
42 }
43
Popular Tags