- 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/MFCReplayDecorator.java
r98 r171 4 4 import de.ugoe.cs.util.StringTools; 5 5 6 /** 7 * <p> 8 * {@link IReplayDecorator} for replay generated for EventBench's MFCReplay tool. 9 * </p> 10 * 11 * @author Steffen Herbold 12 * @version 1.0 13 */ 6 14 public class MFCReplayDecorator implements IReplayDecorator { 7 15 8 16 /** 17 * <p> 9 18 * Id for object serialization. 19 * </p> 10 20 */ 11 21 private static final long serialVersionUID = 1L; 12 22 23 /** 24 * <p> 25 * The instance of the {@link MFCReplayDecorator} (implemented as 26 * singleton). 27 * </p> 28 */ 13 29 transient private static MFCReplayDecorator theInstance; 14 15 private MFCReplayDecorator() {}; 16 30 31 /** 32 * <p> 33 * Constructor. Private to guarantee that only one instance of the replay 34 * generator exists. 35 * </p> 36 */ 37 private MFCReplayDecorator() { 38 }; 39 40 /** 41 * <p> 42 * Returns the instance of the MFCReplayDecorator. 43 * </p> 44 * 45 * @return instance of the MFCReplayDecorator. 46 */ 17 47 public static MFCReplayDecorator getInstance() { 18 if ( theInstance==null) {48 if (theInstance == null) { 19 49 theInstance = new MFCReplayDecorator(); 20 50 } 21 51 return theInstance; 22 52 } 23 53 54 /* 55 * (non-Javadoc) 56 * 57 * @see de.ugoe.cs.eventbench.IReplayDecorator#getHeader() 58 */ 24 59 @Override 25 60 public String getHeader() { 26 return "<?xml version=\"1.0\" encoding=\"UTF-16\"?>" + StringTools.ENDLINE +27 28 61 return "<?xml version=\"1.0\" encoding=\"UTF-16\"?>" 62 + StringTools.ENDLINE + "<log>" + StringTools.ENDLINE; 63 29 64 } 30 65 66 /* 67 * (non-Javadoc) 68 * 69 * @see de.ugoe.cs.eventbench.IReplayDecorator#getFooter() 70 */ 31 71 @Override 32 72 public String getFooter() { … … 34 74 } 35 75 76 /* 77 * (non-Javadoc) 78 * 79 * @see de.ugoe.cs.eventbench.IReplayDecorator#getSessionHeader(int) 80 */ 36 81 @Override 37 82 public String getSessionHeader(int sessionId) { 38 return " <session id=\"" +sessionId+"\">" + StringTools.ENDLINE;83 return " <session id=\"" + sessionId + "\">" + StringTools.ENDLINE; 39 84 } 40 85 86 /* 87 * (non-Javadoc) 88 * 89 * @see de.ugoe.cs.eventbench.IReplayDecorator#getSessionFooter(int) 90 */ 41 91 @Override 42 92 public String getSessionFooter(int sessionId) { 43 93 return " </session>" + StringTools.ENDLINE; 44 94 } 45 46 95 47 96 }
Note: See TracChangeset
for help on using the changeset viewer.