- Timestamp:
- 09/09/11 06:23:36 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/MessageHandler.java
r75 r171 1 1 package de.ugoe.cs.eventbench.windows; 2 2 3 /** 4 * <p> 5 * Base class to define custom message handlers, for messages that shall be 6 * handled differently during the parsing of usage logs. It provides dummy 7 * implementations for all required methods, such that implementations can only 8 * overwrite the parts they actually require and ignore the rest. 9 * </p> 10 * 11 * @author Steffen Herbold 12 * @version 1.0 13 */ 14 public class MessageHandler { 3 15 4 public class MessageHandler { 5 6 protected MessageHandler() {} 7 8 public void onStartElement() {} 9 public void onParameter(String name, String value) {} 10 public void onEndElement() {} 16 /** 17 * <p> 18 * Constructor. Protected to prohibit initialization of the base class 19 * itself. 20 * </p> 21 */ 22 protected MessageHandler() { 23 } 24 25 /** 26 * <p> 27 * Called in the startElement() method of the {@link LogParser} when a 28 * msg-node begins. 29 * </p> 30 */ 31 public void onStartElement() { 32 } 33 34 /** 35 * <p> 36 * Called by the {@link LogParser} to handle param-nodes. 37 * </p> 38 * 39 * @param name 40 * name (type) of the parameter 41 * @param value 42 * value of the parameter 43 */ 44 public void onParameter(String name, String value) { 45 } 46 47 /** 48 * <p> 49 * Called in the endElement() method of {@link LogParser} when a msg-node 50 * ends. 51 * </p> 52 */ 53 public void onEndElement() { 54 } 11 55 }
Note: See TracChangeset
for help on using the changeset viewer.