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 DecimalFormat
df
-
Constructor Summary
Constructors Constructor Description LogtoolContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
cli(String inputFile, Analyzer analyzer)
default command-line processor.protected Object
getBean(String beanName)
Retrieves a Spring component instance by nameprotected org.springframework.context.ApplicationContext
getContext()
Return the ApplicationContextprotected LogtoolCore
getCore()
Returns LogtoolCore instanceprotected DomainObjectReader
getDomainObjectReader()
Returns DomainObjectReader instanceprotected void
initialize()
Set up the Spring context, initialize common number formatting setupprotected void
registerMessageListener(Class<?> type)
protected void
registerNewObjectListener(NewObjectListener listener, Class<?> type)
Passthrough for event registrationprotected void
setContext(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)
-
-