- Timestamp:
- 10/12/12 14:04:09 (12 years ago)
- 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 5 5 /** 6 6 * <p> 7 * TODO comment7 * represents infos of a client together with a shown URL and its title 8 8 * </p> 9 9 * … … 13 13 14 14 /** 15 * 15 * id of a client 16 16 */ 17 17 private String clientId; 18 18 19 19 /** 20 * 20 * browser used by the client 21 21 */ 22 22 private String userAgent; 23 23 24 24 /** 25 * 25 * URL of the web site shown by the browser of the client 26 26 */ 27 27 private URL url; 28 28 29 29 /** 30 * 30 * title of the web site shown by the browser of the client 31 31 */ 32 32 private String title; … … 34 34 /** 35 35 * <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. 37 38 * </p> 38 39 * 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 43 44 */ 44 45 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 3 3 /** 4 4 * <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. 6 9 * </p> 7 10 * … … 11 14 12 15 /** 13 * 16 * infos about the client that caused the event 14 17 */ 15 18 private HtmlClientInfos clientInfos; 16 19 17 20 /** 18 * 21 * the time stamp of the event 19 22 */ 20 23 private Long time; 21 24 22 25 /** 23 * 26 * the path in the HTML DOM to the object on which the event was executed 24 27 */ 25 28 private String path; 26 29 27 30 /** 28 * 31 * the type of the event, e.g. onclick 29 32 */ 30 33 private String eventType; 31 34 32 35 /** 33 * 36 * the coordinates of the event, usually an array with two values (x and y) 34 37 */ 35 38 private Integer[] coordinates; 36 39 37 40 /** 38 * 41 * if the event is a key event, the key that was pressed or released 39 42 */ 40 43 private Integer key; 41 44 42 45 /** 43 * 46 * if the event is a scroll event, the resulting position of the scrolled element 44 47 */ 45 48 private Integer scrollPosition; … … 47 50 /** 48 51 * <p> 49 * TODO: comment52 * initializes the event with all relevantinfos 50 53 * </p> 51 54 * 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 59 64 */ 60 65 HtmlEvent(HtmlClientInfos clientInfos, -
trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlMonitor.java
r857 r870 5 5 /** 6 6 * <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. 8 11 * </p> 9 12 * … … 12 15 public class HtmlMonitor implements HtmlMonitorComponent { 13 16 14 /** */ 17 /** 18 * the port on which the webserver shall listen. Defaults to 8090. 19 */ 15 20 private int port = 8090; 16 21 17 /** */ 22 /** 23 * the web server receiving the log messages 24 */ 18 25 private HtmlMonitorServer server; 19 26 20 /** */ 27 /** 28 * the directory into which the log files shall be written 29 */ 21 30 private String logFileBaseDir; 22 31 23 /** */ 32 /** 33 * the log manager being responsible for performing the logging 34 */ 24 35 private HtmlMonitorLogManager logManager; 25 36 26 /** */ 37 /** 38 * the thread needed to handle CTRL-C events 39 */ 27 40 private Thread shutdownHook; 28 41 29 42 /** 30 43 * <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 32 46 * </p> 33 47 * 34 * @param logFileBaseDir 48 * @param commandLineArguments the command line arguments when starting the monitor using 49 * the {@link Runner} 35 50 */ 36 HtmlMonitor(String[] commandLineArguments) {51 public HtmlMonitor(String[] commandLineArguments) { 37 52 if (commandLineArguments.length > 0) { 38 53 this.logFileBaseDir = commandLineArguments[0]; -
trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlMonitorComponent.java
r857 r870 3 3 /** 4 4 * <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()}). 6 8 * </p> 7 9 * … … 11 13 12 14 /** 15 * initializes a component, i.e. it does everything needed to prepare starting the component 13 16 * 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 14 21 */ 15 22 void init() throws IllegalStateException, HtmlMonitorException; 16 23 17 24 /** 25 * starts a component 18 26 * 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 19 31 */ 20 32 void start() throws IllegalStateException, HtmlMonitorException; 21 33 22 34 /** 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. 24 38 */ 25 39 void stop(); -
trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlMonitorException.java
r857 r870 3 3 /** 4 4 * <p> 5 * TODO comment 5 * Exception to notify all irregularities, that are specific to the HTML monitor and its 6 * components. 6 7 * </p> 7 8 * … … 15 16 /** 16 17 * <p> 18 * initializes an exception with a simple message 17 19 * </p> 18 20 * 19 * @param message 21 * @param message the message of the exception 20 22 */ 21 23 public HtmlMonitorException(String message) { … … 25 27 /** 26 28 * <p> 29 * initializes an exception with a simple message and a causing exception 27 30 * </p> 28 31 * 29 * @param message 30 * @param cause 32 * @param message the message of the exception 33 * @param cause the root cause of the exception 31 34 */ 32 35 public HtmlMonitorException(String message, Throwable cause) {
Note: See TracChangeset
for help on using the changeset viewer.