Package jasima.core.util
Class TraceFileProducer
- java.lang.Object
-
- jasima.core.util.TraceFileProducer
-
- All Implemented Interfaces:
SimComponentLifecycleListener,NotifierListener<SimComponent,SimComponent.SimComponentEvent>,Consumer<SimPrintMessage>
public class TraceFileProducer extends Object implements SimComponentLifecycleListener, Consumer<SimPrintMessage>
Produces a detailed log of all trace messages of aSimulationin a text file. Creating this file is rather slow, so this class is mainly useful for debugging purposes.This class can either be added as a listener to a
SimComponent(usually the root component) as it implementsSimComponentLifecycleListener. Alternatively it can be directly added as a print listener of aSimulation(it therefore implementsConsumer<SimPrintMessage>).- Author:
- Torsten Hildebrandt
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jasima.core.simulation.SimComponentLifecycleListener
SimComponentLifecycleListener.DoneListener, SimComponentLifecycleListener.InitListener, SimComponentLifecycleListener.OtherListener, SimComponentLifecycleListener.ResetStatsListener, SimComponentLifecycleListener.ResultsListener, SimComponentLifecycleListener.SimEndListener, SimComponentLifecycleListener.SimStartListener
-
-
Constructor Summary
Constructors Constructor Description TraceFileProducer()TraceFileProducer(String fileName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(SimPrintMessage msg)voiddone(SimComponent sc)StringgetFileName()voidinit(SimComponent sc)voidsetFileName(String fileName)StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jasima.core.simulation.SimComponentLifecycleListener
handleOther, inform, produceResults, resetStats, simEnd, simStart
-
-
-
-
Constructor Detail
-
TraceFileProducer
public TraceFileProducer()
-
TraceFileProducer
public TraceFileProducer(String fileName)
-
-
Method Detail
-
init
public void init(SimComponent sc)
- Specified by:
initin interfaceSimComponentLifecycleListener
-
done
public void done(SimComponent sc)
- Specified by:
donein interfaceSimComponentLifecycleListener
-
accept
public void accept(SimPrintMessage msg)
- Specified by:
acceptin interfaceConsumer<SimPrintMessage>
-
getFileName
public String getFileName()
-
setFileName
public void setFileName(String fileName)
-
-