Changeset 77 for trunk/EventBenchConsole/src/de/ugoe/cs
- Timestamp:
- 06/16/11 15:05:59 (14 years ago)
- Location:
- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/EventGenerator.java ¶
r58 r77 17 17 import org.jdom.input.SAXBuilder; 18 18 19 import de.ugoe.cs.eventbench.data.Event;20 import de.ugoe.cs.eventbench.data.ReplayableEvent;21 19 import de.ugoe.cs.eventbench.windows.data.WindowTree; 22 20 import de.ugoe.cs.eventbench.windows.data.WindowTreeNode; … … 81 79 * </p> 82 80 */ 83 private ReplayableEvent<WindowsMessage>currentToken;81 private WindowsEvent currentToken; 84 82 85 83 /** … … 119 117 * <p> 120 118 * Tries to match the rules to the given sequence to generate an 121 * {@link Event}.119 * {@link WindowsEvent}. 122 120 * </p> 123 121 * <p> … … 132 130 */ 133 131 @SuppressWarnings("unchecked") 134 public Event<WindowsMessage>generateEvent(List<WindowsMessage> sequence) {132 public WindowsEvent generateEvent(List<WindowsMessage> sequence) { 135 133 Document rulesDoc = getDocument(rulesFile); 136 134 Element rulesRoot = rulesDoc.getRootElement(); … … 144 142 Element currentRule = ruleElements.get(ruleIndex); 145 143 currentRuleName = currentRule.getAttributeValue("name"); 146 currentToken = new ReplayableEvent<WindowsMessage>(currentRuleName);144 currentToken = new WindowsEvent(currentRuleName); 147 145 currentToken.setDecorator(MFCReplayDecorator.getInstance()); 148 146 isMatch = true; -
TabularUnified trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/LogParser.java ¶
r76 r77 23 23 import org.xml.sax.helpers.DefaultHandler; 24 24 25 import de.ugoe.cs.eventbench.data.Event;26 25 import de.ugoe.cs.eventbench.windows.data.WindowTree; 27 26 import de.ugoe.cs.eventbench.windows.data.WindowsMessage; … … 37 36 private SequenceSplitter sequenceSplitter; 38 37 39 private List<List< Event<WindowsMessage>>> sequences;38 private List<List<WindowsEvent>> sequences; 40 39 41 40 private SortedMap<Integer, Integer> typeCounter; … … 49 48 public LogParser(boolean countMessageOccurences) { 50 49 sequenceSplitter = new SequenceSplitter(); 51 sequences = new LinkedList<List< Event<WindowsMessage>>>();50 sequences = new LinkedList<List<WindowsEvent>>(); 52 51 currentHandler = null; 53 52 this.countMessageOccurences = countMessageOccurences; … … 58 57 } 59 58 60 public List<List< Event<WindowsMessage>>> getSequences() {59 public List<List<WindowsEvent>> getSequences() { 61 60 return sequences; 62 61 } -
TabularUnified trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/SequenceSplitter.java ¶
r76 r77 4 4 import java.util.List; 5 5 6 import de.ugoe.cs.eventbench.data.Event;7 6 import de.ugoe.cs.eventbench.windows.data.WindowsMessage; 8 7 import de.ugoe.cs.util.console.Console; … … 18 17 private EventGenerator tokenGenerator; 19 18 20 private List< Event<WindowsMessage>> actionSequence;19 private List<WindowsEvent> actionSequence; 21 20 22 21 public SequenceSplitter() { … … 25 24 initMessages = true; 26 25 tokenGenerator = new EventGenerator(); 27 actionSequence = new LinkedList< Event<WindowsMessage>>();26 actionSequence = new LinkedList<WindowsEvent>(); 28 27 } 29 28 … … 31 30 if( startOfSequence(msg) ) { 32 31 if( !initMessages ) { 33 Event<WindowsMessage>currentAction = tokenGenerator.generateEvent(currentSequence);32 WindowsEvent currentAction = tokenGenerator.generateEvent(currentSequence); 34 33 if( currentAction!=null ) { 35 34 actionSequence.add(currentAction); … … 51 50 } 52 51 53 public List< Event<WindowsMessage>> getSequence() {52 public List<WindowsEvent> getSequence() { 54 53 return actionSequence; 55 54 } 56 55 57 56 public void endSession() { 58 Event<WindowsMessage>currentAction = tokenGenerator.generateEvent(currentSequence);57 WindowsEvent currentAction = tokenGenerator.generateEvent(currentSequence); 59 58 if( currentAction!=null ) { 60 59 actionSequence.add(currentAction); -
TabularUnified trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/commands/CMDparseXML.java ¶
r52 r77 4 4 import java.util.List; 5 5 6 import de.ugoe.cs.eventbench.data.Event;7 6 import de.ugoe.cs.eventbench.data.GlobalDataContainer; 8 7 import de.ugoe.cs.eventbench.windows.LogParser; 9 import de.ugoe.cs.eventbench.windows. data.WindowsMessage;8 import de.ugoe.cs.eventbench.windows.WindowsEvent; 10 9 import de.ugoe.cs.util.console.Command; 11 10 import de.ugoe.cs.util.console.Console; … … 35 34 parser.parseFile(filename); 36 35 37 List<List< Event<WindowsMessage>>> sequences = parser.getSequences();36 List<List<WindowsEvent>> sequences = parser.getSequences(); 38 37 39 38 GlobalDataContainer.getInstance().addData("sequences", sequences);
Note: See TracChangeset
for help on using the changeset viewer.