Changeset 77


Ignore:
Timestamp:
06/16/11 15:05:59 (13 years ago)
Author:
sherbold
Message:

+ introduced de.ugoe.cs.eventbench.windows.WindowsEvent?

Location:
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/EventGenerator.java

    r58 r77  
    1717import org.jdom.input.SAXBuilder; 
    1818 
    19 import de.ugoe.cs.eventbench.data.Event; 
    20 import de.ugoe.cs.eventbench.data.ReplayableEvent; 
    2119import de.ugoe.cs.eventbench.windows.data.WindowTree; 
    2220import de.ugoe.cs.eventbench.windows.data.WindowTreeNode; 
     
    8179         * </p> 
    8280         */ 
    83         private ReplayableEvent<WindowsMessage> currentToken; 
     81        private WindowsEvent currentToken; 
    8482 
    8583        /** 
     
    119117         * <p> 
    120118         * Tries to match the rules to the given sequence to generate an 
    121          * {@link Event}. 
     119         * {@link WindowsEvent}. 
    122120         * </p> 
    123121         * <p> 
     
    132130         */ 
    133131        @SuppressWarnings("unchecked") 
    134         public Event<WindowsMessage> generateEvent(List<WindowsMessage> sequence) { 
     132        public WindowsEvent generateEvent(List<WindowsMessage> sequence) { 
    135133                Document rulesDoc = getDocument(rulesFile); 
    136134                Element rulesRoot = rulesDoc.getRootElement(); 
     
    144142                        Element currentRule = ruleElements.get(ruleIndex); 
    145143                        currentRuleName = currentRule.getAttributeValue("name"); 
    146                         currentToken = new ReplayableEvent<WindowsMessage>(currentRuleName); 
     144                        currentToken = new WindowsEvent(currentRuleName); 
    147145                        currentToken.setDecorator(MFCReplayDecorator.getInstance()); 
    148146                        isMatch = true; 
  • trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/LogParser.java

    r76 r77  
    2323import org.xml.sax.helpers.DefaultHandler; 
    2424 
    25 import de.ugoe.cs.eventbench.data.Event; 
    2625import de.ugoe.cs.eventbench.windows.data.WindowTree; 
    2726import de.ugoe.cs.eventbench.windows.data.WindowsMessage; 
     
    3736        private SequenceSplitter sequenceSplitter; 
    3837         
    39         private List<List<Event<WindowsMessage>>> sequences; 
     38        private List<List<WindowsEvent>> sequences; 
    4039         
    4140        private SortedMap<Integer, Integer> typeCounter; 
     
    4948        public LogParser(boolean countMessageOccurences) { 
    5049                sequenceSplitter = new SequenceSplitter(); 
    51                 sequences = new LinkedList<List<Event<WindowsMessage>>>(); 
     50                sequences = new LinkedList<List<WindowsEvent>>(); 
    5251                currentHandler = null; 
    5352                this.countMessageOccurences = countMessageOccurences; 
     
    5857        } 
    5958         
    60         public List<List<Event<WindowsMessage>>> getSequences() { 
     59        public List<List<WindowsEvent>> getSequences() { 
    6160                return sequences; 
    6261        } 
  • trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/SequenceSplitter.java

    r76 r77  
    44import java.util.List; 
    55 
    6 import de.ugoe.cs.eventbench.data.Event; 
    76import de.ugoe.cs.eventbench.windows.data.WindowsMessage; 
    87import de.ugoe.cs.util.console.Console; 
     
    1817        private EventGenerator tokenGenerator; 
    1918         
    20         private List<Event<WindowsMessage>> actionSequence; 
     19        private List<WindowsEvent> actionSequence; 
    2120         
    2221        public SequenceSplitter() { 
     
    2524                initMessages = true; 
    2625                tokenGenerator = new EventGenerator(); 
    27                 actionSequence = new LinkedList<Event<WindowsMessage>>(); 
     26                actionSequence = new LinkedList<WindowsEvent>(); 
    2827        } 
    2928         
     
    3130                if( startOfSequence(msg) ) { 
    3231                        if( !initMessages ) { 
    33                                 Event<WindowsMessage> currentAction = tokenGenerator.generateEvent(currentSequence); 
     32                                WindowsEvent currentAction = tokenGenerator.generateEvent(currentSequence); 
    3433                                if( currentAction!=null ) { 
    3534                                        actionSequence.add(currentAction); 
     
    5150        } 
    5251         
    53         public List<Event<WindowsMessage>> getSequence() { 
     52        public List<WindowsEvent> getSequence() { 
    5453                return actionSequence; 
    5554        } 
    5655         
    5756        public void endSession() { 
    58                 Event<WindowsMessage> currentAction = tokenGenerator.generateEvent(currentSequence); 
     57                WindowsEvent currentAction = tokenGenerator.generateEvent(currentSequence); 
    5958                if( currentAction!=null ) { 
    6059                        actionSequence.add(currentAction); 
  • trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/commands/CMDparseXML.java

    r52 r77  
    44import java.util.List; 
    55 
    6 import de.ugoe.cs.eventbench.data.Event; 
    76import de.ugoe.cs.eventbench.data.GlobalDataContainer; 
    87import de.ugoe.cs.eventbench.windows.LogParser; 
    9 import de.ugoe.cs.eventbench.windows.data.WindowsMessage; 
     8import de.ugoe.cs.eventbench.windows.WindowsEvent; 
    109import de.ugoe.cs.util.console.Command; 
    1110import de.ugoe.cs.util.console.Console; 
     
    3534                parser.parseFile(filename); 
    3635                 
    37                 List<List<Event<WindowsMessage>>> sequences = parser.getSequences(); 
     36                List<List<WindowsEvent>> sequences = parser.getSequences(); 
    3837                 
    3938                GlobalDataContainer.getInstance().addData("sequences", sequences);               
Note: See TracChangeset for help on using the changeset viewer.