Ignore:
Timestamp:
10/12/12 14:04:09 (12 years ago)
Author:
pharms
Message:
  • added some comments
Location:
trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlClientInfos.java

    r857 r870  
    55/** 
    66 * <p> 
    7  * TODO comment 
     7 * represents infos of a client together with a shown URL and its title 
    88 * </p> 
    99 *  
     
    1313 
    1414    /** 
    15      *  
     15     * id of a client 
    1616     */ 
    1717    private String clientId; 
    1818 
    1919    /** 
    20      *  
     20     * browser used by the client 
    2121     */ 
    2222    private String userAgent; 
    2323 
    2424    /** 
    25      *  
     25     * URL of the web site shown by the browser of the client 
    2626     */ 
    2727    private URL url; 
    2828 
    2929    /** 
    30      *  
     30     * title of the web site shown by the browser of the client 
    3131     */ 
    3232    private String title; 
     
    3434    /** 
    3535     * <p> 
    36      * TODO: comment 
     36     * instantiates an infos object with client id, browser at client side, the URL of the 
     37     * shown website and its title. 
    3738     * </p> 
    3839     * 
    39      * @param clientId 
    40      * @param userAgent 
    41      * @param url 
    42      * @param title 
     40     * @param clientId  id of a client 
     41     * @param userAgent browser used by the client 
     42     * @param url       URL of the web site shown by the browser of the client 
     43     * @param title     title of the web site shown by the browser of the client 
    4344     */ 
    4445    public HtmlClientInfos(String clientId, String userAgent, URL url, String title) { 
  • trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlEvent.java

    r857 r870  
    33/** 
    44 * <p> 
    5  * TODO comment 
     5 * represents an event caused by a user on a specific web site. An event contains the infos 
     6 * about the client ({@link HtmlClientInfos}, when ant where the event took place, the type of 
     7 * event and some additional infos such as the event coordinates or the number of the pressed 
     8 * key.  
    69 * </p> 
    710 *  
     
    1114 
    1215    /** 
    13      *  
     16     * infos about the client that caused the event 
    1417     */ 
    1518    private HtmlClientInfos clientInfos; 
    1619 
    1720    /** 
    18      *  
     21     * the time stamp of the event 
    1922     */ 
    2023    private Long time; 
    2124 
    2225    /** 
    23      *  
     26     * the path in the HTML DOM to the object on which the event was executed 
    2427     */ 
    2528    private String path; 
    2629 
    2730    /** 
    28      *  
     31     * the type of the event, e.g. onclick 
    2932     */ 
    3033    private String eventType; 
    3134 
    3235    /** 
    33      *  
     36     * the coordinates of the event, usually an array with two values (x and y) 
    3437     */ 
    3538    private Integer[] coordinates; 
    3639 
    3740    /** 
    38      *  
     41     * if the event is a key event, the key that was pressed or released 
    3942     */ 
    4043    private Integer key; 
    4144 
    4245    /** 
    43      *  
     46     * if the event is a scroll event, the resulting position of the scrolled element 
    4447     */ 
    4548    private Integer scrollPosition; 
     
    4750    /** 
    4851     * <p> 
    49      * TODO: comment 
     52     * initializes the event with all relevantinfos 
    5053     * </p> 
    5154     * 
    52      * @param clientInfos 
    53      * @param time 
    54      * @param path 
    55      * @param eventType 
    56      * @param coordinates 
    57      * @param key 
    58      * @param scrollPosition 
     55     * @param clientInfos    infos about the client that caused the event 
     56     * @param time           the time stamp of the event 
     57     * @param path           the path in the HTML DOM to the object on which the event was executed 
     58     * @param eventType      the type of the event, e.g. onclick 
     59     * @param coordinates    the coordinates of the event, usually an array with two values 
     60     *                       (x and y) 
     61     * @param key            if the event is a key event, the key that was pressed or released 
     62     * @param scrollPosition if the event is a scroll event, the resulting position of the 
     63     *                       scrolled element 
    5964     */ 
    6065    HtmlEvent(HtmlClientInfos clientInfos, 
  • trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlMonitor.java

    r857 r870  
    55/** 
    66 * <p> 
    7  * TODO comment 
     7 * The HTML monitor starts a web server ({@link HtmlMonitorServer}) that receives log messages 
     8 * of the HTML monitor java script. These messages are logged using the 
     9 * {@link HtmlMonitorLogManager}. The class assures that on shutdown e.g. caused by CTRL-C the 
     10 * server and the log manager are stopped correctly. 
    811 * </p> 
    912 *  
     
    1215public class HtmlMonitor implements HtmlMonitorComponent { 
    1316 
    14     /** */ 
     17    /** 
     18     * the port on which the webserver shall listen. Defaults to 8090. 
     19     */ 
    1520    private int port = 8090; 
    1621     
    17     /** */ 
     22    /** 
     23     * the web server receiving the log messages 
     24     */ 
    1825    private HtmlMonitorServer server; 
    1926     
    20     /** */ 
     27    /** 
     28     * the directory into which the log files shall be written 
     29     */ 
    2130    private String logFileBaseDir; 
    2231 
    23     /** */ 
     32    /** 
     33     * the log manager being responsible for performing the logging 
     34     */ 
    2435    private HtmlMonitorLogManager logManager; 
    2536 
    26     /** */ 
     37    /** 
     38     * the thread needed to handle CTRL-C events 
     39     */ 
    2740    private Thread shutdownHook; 
    2841 
    2942    /** 
    3043     * <p> 
    31      * TODO: comment 
     44     * initializes the monitor with the command line arguments. Those may be the log directory 
     45     * as first argument and the port to listen on as second 
    3246     * </p> 
    3347     * 
    34      * @param logFileBaseDir 
     48     * @param commandLineArguments the command line arguments when starting the monitor using 
     49     *                             the {@link Runner} 
    3550     */ 
    36     HtmlMonitor(String[] commandLineArguments) { 
     51    public HtmlMonitor(String[] commandLineArguments) { 
    3752        if (commandLineArguments.length > 0) { 
    3853            this.logFileBaseDir = commandLineArguments[0]; 
  • trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlMonitorComponent.java

    r857 r870  
    33/** 
    44 * <p> 
    5  * TODO comment 
     5 * convenience interface for all components making up the HTML monitor. All components implement 
     6 * this interface to ensure homogeneity throughout them. A component must first be initialized 
     7 * ({@link #init()}), then started ({@link #start()}) and finally stopped ({@link #stop()}). 
    68 * </p> 
    79 *  
     
    1113 
    1214    /** 
     15     * initializes a component, i.e. it does everything needed to prepare starting the component 
    1316     *  
     17     * @throws IllegalStateException thrown if the method was already called before but 
     18     *                               {@link #stop()} wasn't called yet 
     19     * @throws HtmlMonitorException  thrown if the initialization fails, e.g. because needed infos 
     20     *                               are missing 
    1421     */ 
    1522    void init() throws IllegalStateException, HtmlMonitorException; 
    1623 
    1724    /** 
     25     * starts a component 
    1826     *  
     27     * @throws IllegalStateException thrown if {@link #init()} wasn't called yet of if the component 
     28     *                               is already started through a preceding call to this method 
     29     * @throws HtmlMonitorException  thrown if the startup fails, e.g. because needed infos 
     30     *                               are missing 
    1931     */ 
    2032    void start() throws IllegalStateException, HtmlMonitorException; 
    2133 
    2234    /** 
    23      *  
     35     * stops a component and cleans up any derivate. In the following, {@link #init()} must be 
     36     * callable again. If the component is not initialized or started, nothing must happen. If the 
     37     * component is initialized but not started, the initialization is revoked. 
    2438     */ 
    2539    void stop(); 
  • trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlMonitorException.java

    r857 r870  
    33/** 
    44 * <p> 
    5  * TODO comment 
     5 * Exception to notify all irregularities, that are specific to the HTML monitor and its 
     6 * components. 
    67 * </p> 
    78 *  
     
    1516    /** 
    1617     * <p> 
     18     * initializes an exception with a simple message 
    1719     * </p> 
    1820     * 
    19      * @param message 
     21     * @param message the message of the exception 
    2022     */ 
    2123    public HtmlMonitorException(String message) { 
     
    2527    /** 
    2628     * <p> 
     29     * initializes an exception with a simple message and a causing exception 
    2730     * </p> 
    2831     * 
    29      * @param message 
    30      * @param cause 
     32     * @param message the message of the exception 
     33     * @param cause   the root cause of the exception 
    3134     */ 
    3235    public HtmlMonitorException(String message, Throwable cause) { 
Note: See TracChangeset for help on using the changeset viewer.