KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > wings > recorder > Request


1 /* $Id: Request.java,v 1.3 2004/12/01 07:54:26 hengels Exp $ */
2 /*
3  * $Id: Request.java,v 1.3 2004/12/01 07:54:26 hengels Exp $
4  * Copyright 2000,2005 wingS development team.
5  *
6  * This file is part of wingS (http://www.j-wings.org).
7  *
8  * wingS is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation; either version 2.1
11  * of the License, or (at your option) any later version.
12  *
13  * Please see COPYING for the complete licence.
14  */

15 package org.wings.recorder;
16
17 import java.util.LinkedList JavaDoc;
18 import java.util.List JavaDoc;
19
20 /**
21  * @author hengels
22  */

23 class Request {
24     private String JavaDoc method;
25     private String JavaDoc resource;
26     private long millis;
27     List JavaDoc events = new LinkedList JavaDoc();
28     List JavaDoc headers = new LinkedList JavaDoc();
29
30     public Request(String JavaDoc method, String JavaDoc resource) {
31         this.method = method;
32         this.resource = resource;
33         this.millis = System.currentTimeMillis();
34     }
35
36     public String JavaDoc getMethod() {
37         return method;
38     }
39
40     public void setMethod(String JavaDoc method) {
41         this.method = method;
42     }
43
44     public String JavaDoc getResource() {
45         return resource;
46     }
47
48     public void setResource(String JavaDoc resource) {
49         this.resource = resource;
50     }
51
52     public List JavaDoc getEvents() {
53         return events;
54     }
55
56     public List JavaDoc getHeaders() {
57         return headers;
58     }
59
60     public long getMillis() {
61         return millis;
62     }
63
64     static class Header {
65         private String JavaDoc name;
66         private String JavaDoc value;
67
68         public Header(String JavaDoc name, String JavaDoc value) {
69             this.name = name;
70             this.value = value;
71         }
72
73         public String JavaDoc getName() {
74             return name;
75         }
76
77         public String JavaDoc getValue() {
78             return value;
79         }
80     }
81
82     static class Event {
83         private String JavaDoc name;
84         private String JavaDoc[] values;
85
86         public Event(String JavaDoc name, String JavaDoc[] values) {
87             this.name = name;
88             this.values = values;
89         }
90
91         public String JavaDoc getName() {
92             return name;
93         }
94
95         public String JavaDoc[] getValues() {
96             return values;
97         }
98     }
99 }
100
Popular Tags