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
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 Details
-
Constructor Details
-
LogtoolContext
public LogtoolContext()
-
-
Method Details
-
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
Returns LogtoolCore instance -
getDomainObjectReader
Returns DomainObjectReader instance -
getBean
Retrieves a Spring component instance by name -
cli
default command-line processor. We assume a single arg, a filename -
registerNewObjectListener
Passthrough for event registration -
registerMessageListener
-