Last change
on this file since 127 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:
1007 bytes
|
Line | |
---|
1 | package de.ugoe.cs.eventbench.web.data;
|
---|
2 |
|
---|
3 | import java.util.List;
|
---|
4 |
|
---|
5 | import de.ugoe.cs.eventbench.data.ReplayableEvent;
|
---|
6 |
|
---|
7 | public class WebEvent extends ReplayableEvent<WebRequest> {
|
---|
8 |
|
---|
9 | /**
|
---|
10 | * <p>
|
---|
11 | * Id for object serialization.
|
---|
12 | * </p>
|
---|
13 | */
|
---|
14 | private static final long serialVersionUID = 1L;
|
---|
15 |
|
---|
16 | private final long timestamp;
|
---|
17 |
|
---|
18 |
|
---|
19 | private final static String makeType(String path, List<String> postVars, List<String> getVars) {
|
---|
20 | String type = path;
|
---|
21 | if( getVars!=null && !getVars.isEmpty() ) {
|
---|
22 | type += "+GET"+getVars.toString().replace(" ", "");
|
---|
23 | }
|
---|
24 | if( postVars!=null && !postVars.isEmpty() ) {
|
---|
25 | type += "+POST"+postVars.toString().replace(" ", "");
|
---|
26 | }
|
---|
27 | return type;
|
---|
28 | }
|
---|
29 |
|
---|
30 | public WebEvent(String path, long timestamp, List<String> postVars, List<String> getVars) {
|
---|
31 | super(makeType(path, postVars, getVars));
|
---|
32 | this.timestamp = timestamp;
|
---|
33 | addReplayEvent(new WebRequest(path, postVars, getVars));
|
---|
34 | }
|
---|
35 |
|
---|
36 | public long getTimestamp() {
|
---|
37 | return timestamp;
|
---|
38 | }
|
---|
39 |
|
---|
40 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.