Package org.powertac.logtool
Class LogtoolContext
- java.lang.Object
 - 
- org.powertac.logtool.LogtoolContext
 
 
- 
- Direct Known Subclasses:
 Logtool,NoopAnalyzer
public abstract class LogtoolContext extends Object
Abstract class to hook an Analyzer into the Spring Context. For this to work, the Analyzer must first call getCore() to retrieve the LogtoolCore reference, then call the readStateLog() method on the LogtoolCore to do the analysis.- Author:
 - John Collins
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected DecimalFormatdf 
- 
Constructor Summary
Constructors Constructor Description LogtoolContext() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcli(String inputFile, Analyzer analyzer)default command-line processor.protected ObjectgetBean(String beanName)Retrieves a Spring component instance by nameprotected org.springframework.context.ApplicationContextgetContext()Return the ApplicationContextprotected LogtoolCoregetCore()Returns LogtoolCore instanceprotected DomainObjectReadergetDomainObjectReader()Returns DomainObjectReader instanceprotected voidinitialize()Set up the Spring context, initialize common number formatting setupprotected voidregisterMessageListener(Class<?> type)protected voidregisterNewObjectListener(NewObjectListener listener, Class<?> type)Passthrough for event registrationprotected voidsetContext(org.springframework.context.ApplicationContext context) 
 - 
 
- 
- 
Field Detail
- 
df
protected DecimalFormat df
 
 - 
 
- 
Method Detail
- 
initialize
protected void initialize()
Set up the Spring context, initialize common number formatting setup 
- 
setContext
protected void setContext(org.springframework.context.ApplicationContext context)
 
- 
getContext
protected org.springframework.context.ApplicationContext getContext()
Return the ApplicationContext 
- 
getCore
protected LogtoolCore getCore()
Returns LogtoolCore instance 
- 
getDomainObjectReader
protected DomainObjectReader getDomainObjectReader()
Returns DomainObjectReader instance 
- 
cli
protected void cli(String inputFile, Analyzer analyzer)
default command-line processor. We assume a single arg, a filename 
- 
registerNewObjectListener
protected void registerNewObjectListener(NewObjectListener listener, Class<?> type)
Passthrough for event registration 
- 
registerMessageListener
protected void registerMessageListener(Class<?> type)
 
 - 
 
 -