Last change
on this file since 112 was
111,
checked in by sherbold, 13 years ago
|
- URI of web sessions is not parsed and split into path and GET parameters; of the GET parameters only the name is used to define the type
|
-
Property svn:mime-type set to
text/plain
|
File size:
1.2 KB
|
Line | |
---|
1 | package de.ugoe.cs.eventbench.web.data;
|
---|
2 |
|
---|
3 | import java.util.ArrayList;
|
---|
4 | import java.util.List;
|
---|
5 |
|
---|
6 | import de.ugoe.cs.eventbench.data.IReplayable;
|
---|
7 |
|
---|
8 | public class WebRequest implements IReplayable {
|
---|
9 |
|
---|
10 | /**
|
---|
11 | * Id for object serialization.
|
---|
12 | */
|
---|
13 | private static final long serialVersionUID = 1L;
|
---|
14 |
|
---|
15 | List<String> postVars;
|
---|
16 | List<String> getVars;
|
---|
17 |
|
---|
18 | String targetUri;
|
---|
19 |
|
---|
20 | public WebRequest(String uri, List<String> postVars, List<String> getVars) {
|
---|
21 | targetUri = uri;
|
---|
22 | this.postVars = new ArrayList<String>(postVars); // defensive copy
|
---|
23 | this.getVars = new ArrayList<String>(getVars);
|
---|
24 | }
|
---|
25 |
|
---|
26 | @Override
|
---|
27 | public String getReplay() {
|
---|
28 | // TODO implement method
|
---|
29 | return null;
|
---|
30 | }
|
---|
31 |
|
---|
32 | @Override
|
---|
33 | public String getTarget() {
|
---|
34 | // TODO implement method
|
---|
35 | return null;
|
---|
36 | }
|
---|
37 |
|
---|
38 | @Override
|
---|
39 | public boolean equals(Object other) {
|
---|
40 | if( this==other ) {
|
---|
41 | return true;
|
---|
42 | }
|
---|
43 | if( other instanceof WebRequest ) {
|
---|
44 | return targetUri.equals(((WebRequest) other).targetUri) && postVars.equals(((WebRequest) other).postVars);
|
---|
45 | }
|
---|
46 | return false;
|
---|
47 | }
|
---|
48 |
|
---|
49 | @Override
|
---|
50 | public int hashCode() {
|
---|
51 | int multiplier = 17;
|
---|
52 | int hash = 42;
|
---|
53 |
|
---|
54 | hash = multiplier * hash + targetUri.hashCode();
|
---|
55 | hash = multiplier * hash + postVars.hashCode();
|
---|
56 |
|
---|
57 | return hash;
|
---|
58 | }
|
---|
59 |
|
---|
60 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.