01: /*
02: * Copyright 2000,2005 wingS development team.
03: *
04: * This file is part of wingS (http://wingsframework.org).
05: *
06: * wingS is free software; you can redistribute it and/or modify
07: * it under the terms of the GNU Lesser General Public License
08: * as published by the Free Software Foundation; either version 2.1
09: * of the License, or (at your option) any later version.
10: *
11: * Please see COPYING for the complete licence.
12: */
13: package org.wings.recorder;
14:
15: import java.util.LinkedList;
16: import java.util.List;
17:
18: /**
19: * @author hengels
20: */
21: class Request {
22: private String method;
23: private String resource;
24: private long millis;
25: List events = new LinkedList();
26: List headers = new LinkedList();
27:
28: public Request(String method, String resource) {
29: this .method = method;
30: this .resource = resource;
31: this .millis = System.currentTimeMillis();
32: }
33:
34: public String getMethod() {
35: return method;
36: }
37:
38: public void setMethod(String method) {
39: this .method = method;
40: }
41:
42: public String getResource() {
43: return resource;
44: }
45:
46: public void setResource(String resource) {
47: this .resource = resource;
48: }
49:
50: public List getEvents() {
51: return events;
52: }
53:
54: public List getHeaders() {
55: return headers;
56: }
57:
58: public long getMillis() {
59: return millis;
60: }
61:
62: static class Header {
63: private String name;
64: private String value;
65:
66: public Header(String name, String value) {
67: this .name = name;
68: this .value = value;
69: }
70:
71: public String getName() {
72: return name;
73: }
74:
75: public String getValue() {
76: return value;
77: }
78: }
79:
80: static class Event {
81: private String name;
82: private String[] values;
83:
84: public Event(String name, String[] values) {
85: this .name = name;
86: this .values = values;
87: }
88:
89: public String getName() {
90: return name;
91: }
92:
93: public String[] getValues() {
94: return values;
95: }
96: }
97: }
|