Ignore:
Timestamp:
09/09/11 06:23:36 (13 years ago)
Author:
sherbold
Message:
  • code documentation and formatting
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/web/data/WebEvent.java

    r111 r171  
    55import de.ugoe.cs.eventbench.data.ReplayableEvent; 
    66 
     7/** 
     8 * <p> 
     9 * This class defines web events (of PHP-based web applications). 
     10 * </p> 
     11 *  
     12 * @author Steffen Herbold 
     13 * @version 1.0 
     14 *  
     15 */ 
    716public class WebEvent extends ReplayableEvent<WebRequest> { 
    817 
     
    1322         */ 
    1423        private static final long serialVersionUID = 1L; 
    15          
     24 
     25        /** 
     26         * Timestamp of the event. 
     27         */ 
    1628        private final long timestamp; 
    17                  
    18          
    19         private final static String makeType(String path, List<String> postVars, List<String> getVars) { 
     29 
     30        /** 
     31         * <p> 
     32         * Helper method that generates the type of the event based on the of the 
     33         * URI, the POST variables, and the GET variables. 
     34         * </p> 
     35         *  
     36         * @param path 
     37         *            path of the URI of the event 
     38         * @param postVars 
     39         *            POST variables send with the event 
     40         * @param getVars 
     41         *            GET variables send with the event 
     42         * @return type of the event 
     43         */ 
     44        private final static String makeType(String path, List<String> postVars, 
     45                        List<String> getVars) { 
    2046                String type = path; 
    21                 if( getVars!=null && !getVars.isEmpty() ) { 
    22                         type += "+GET"+getVars.toString().replace(" ", ""); 
     47                if (getVars != null && !getVars.isEmpty()) { 
     48                        type += "+GET" + getVars.toString().replace(" ", ""); 
    2349                } 
    24                 if( postVars!=null && !postVars.isEmpty() ) { 
    25                         type += "+POST"+postVars.toString().replace(" ", ""); 
     50                if (postVars != null && !postVars.isEmpty()) { 
     51                        type += "+POST" + postVars.toString().replace(" ", ""); 
    2652                } 
    2753                return type; 
    2854        } 
    29          
    30         public WebEvent(String path, long timestamp, List<String> postVars, List<String> getVars) { 
     55 
     56        /** 
     57         * <p> 
     58         * Constructor. Creates a new WebEvent. 
     59         * </p> 
     60         *  
     61         * @param path 
     62         *            path of the URI 
     63         * @param timestamp 
     64         *            timestamp of when the event took place 
     65         * @param postVars 
     66         *            POST variables send with the event 
     67         * @param getVars 
     68         *            GET variables send with the event 
     69         */ 
     70        public WebEvent(String path, long timestamp, List<String> postVars, 
     71                        List<String> getVars) { 
    3172                super(makeType(path, postVars, getVars)); 
    3273                this.timestamp = timestamp; 
    3374                addReplayEvent(new WebRequest(path, postVars, getVars)); 
    3475        } 
    35          
     76 
     77        /** 
     78         * <p> 
     79         * Returns the timestamp of the event. 
     80         * </p> 
     81         *  
     82         * @return timestamp of th event 
     83         */ 
    3684        public long getTimestamp() { 
    3785                return timestamp; 
Note: See TracChangeset for help on using the changeset viewer.