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/WebRequest.java

    r111 r171  
    66import de.ugoe.cs.eventbench.data.IReplayable; 
    77 
     8/** 
     9 * <p> 
     10 * Contains all information related to a web request, i.e., the path, the POST 
     11 * variables and the GET variables. 
     12 * </p> 
     13 *  
     14 * @author Steffen Herbold 
     15 * @version 1.0 
     16 */ 
    817public class WebRequest implements IReplayable { 
    918 
    1019        /** 
     20         * <p> 
    1121         * Id for object serialization. 
     22         * </p> 
    1223         */ 
    1324        private static final long serialVersionUID = 1L; 
    1425 
     26        /** 
     27         * <p> 
     28         * POST variables of the web request. 
     29         * </p> 
     30         */ 
    1531        List<String> postVars; 
     32 
     33        /** 
     34         * <p> 
     35         * GET variables of the web request. 
     36         * </p> 
     37         */ 
    1638        List<String> getVars; 
    17          
     39 
     40        /** 
     41         * <p> 
     42         * URI of the web request. 
     43         * </p> 
     44         */ 
    1845        String targetUri; 
    19          
     46 
     47        /** 
     48         * <p> 
     49         * Constructor. Creates a new WebRequest. 
     50         * </p> 
     51         *  
     52         * @param uri 
     53         *            URI of the request 
     54         * @param postVars 
     55         *            POST variables of the request 
     56         * @param getVars 
     57         *            GET variables of the request 
     58         */ 
    2059        public WebRequest(String uri, List<String> postVars, List<String> getVars) { 
    2160                targetUri = uri; 
     
    2362                this.getVars = new ArrayList<String>(getVars); 
    2463        } 
    25          
     64 
     65        /* 
     66         * (non-Javadoc) 
     67         *  
     68         * @see de.ugoe.cs.eventbench.data.IReplayable#getReplay() 
     69         */ 
    2670        @Override 
    2771        public String getReplay() { 
     
    3074        } 
    3175 
     76        /* 
     77         * (non-Javadoc) 
     78         *  
     79         * @see de.ugoe.cs.eventbench.data.IReplayable#getTarget() 
     80         */ 
    3281        @Override 
    3382        public String getTarget() { 
     
    3584                return null; 
    3685        } 
    37          
     86 
     87        /** 
     88         * <p> 
     89         * Two {@link WebRequest}s are equal, if their {@link #targetUri}, 
     90         * {@link #postVars}, and {@link #getVars} are equal. 
     91         * </p> 
     92         *  
     93         * @see java.lang.Object#equals(java.lang.Object) 
     94         */ 
    3895        @Override 
    3996        public boolean equals(Object other) { 
    40                 if( this==other ) { 
     97                if (this == other) { 
    4198                        return true; 
    4299                } 
    43                 if( other instanceof WebRequest ) { 
    44                         return targetUri.equals(((WebRequest) other).targetUri) && postVars.equals(((WebRequest) other).postVars); 
     100                if (other instanceof WebRequest) { 
     101                        return targetUri.equals(((WebRequest) other).targetUri) 
     102                                        && postVars.equals(((WebRequest) other).postVars) 
     103                                        && getVars.equals(((WebRequest) other).getVars); 
    45104                } 
    46105                return false; 
    47106        } 
    48          
     107 
     108        /* 
     109         * (non-Javadoc) 
     110         *  
     111         * @see java.lang.Object#hashCode() 
     112         */ 
    49113        @Override 
    50114        public int hashCode() { 
     
    54118                hash = multiplier * hash + targetUri.hashCode(); 
    55119                hash = multiplier * hash + postVars.hashCode(); 
     120                hash = multiplier * hash + getVars.hashCode(); 
    56121 
    57122                return hash; 
Note: See TracChangeset for help on using the changeset viewer.