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