public class StatisticsLogger extends java.lang.Object implements Listener<NegotiationEvent>, java.io.Closeable
| Modifier and Type | Field and Description |
|---|---|
protected AgentsStatistics |
agentStats
key= agent name, Statistic is the statistical info logged for that agent.
|
| Constructor and Description |
|---|
StatisticsLogger(java.io.OutputStream out) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
notifyChange(NegotiationEvent e)
a notification call that occurs when something changed.
|
protected AgentsStatistics agentStats
public StatisticsLogger(java.io.OutputStream out)
throws java.io.FileNotFoundException,
javax.xml.stream.XMLStreamException
out - OutputStream to write the log to. If this is a file,
we recommend to use the extension ".xml". This logger becomes
owner of this outputstream and will close it eventually.java.io.FileNotFoundExceptionjavax.xml.stream.XMLStreamExceptionpublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic void notifyChange(NegotiationEvent e)
ListenerSwingUtilities.invokeLater(Runnable). We recommend to avoid
synchronize as this will can block indefinitely (see notice 1) which
might lead to deadlocks.notifyChange in interface Listener<NegotiationEvent>e - additional data, typically the new value associated with the
event