Package org.powertac.samplebroker.core
Class BrokerPropertiesService
- java.lang.Object
-
- org.powertac.samplebroker.core.BrokerPropertiesService
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
@Service public class BrokerPropertiesService extends Object implements org.springframework.context.ApplicationContextAware
Supports annotation-based configuration of broker components from properties or xml config files.- Author:
- John Collins
-
-
Constructor Summary
Constructors Constructor Description BrokerPropertiesService()Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProperties(Properties props)Adds the Properties structure to the broker configuration.voidaddProperties(org.apache.commons.configuration2.PropertiesConfiguration props)Adds the PropertiesConfiguration to the broker configuration.Collection<?>configureInstances(Class<?> target)voidconfigureMe(Object target)DoublegetDoubleProperty(String name, Double defaultValue)IntegergetIntegerProperty(String name, Integer defaultValue)StringgetProperty(String name)StringgetProperty(String name, String defaultValue)voidsetApplicationContext(org.springframework.context.ApplicationContext context)voidsetProperty(String key, Object value)Changes the value of a property (or adds a property).voidsetUserConfig(File userConfig)
-
-
-
Method Detail
-
setUserConfig
public void setUserConfig(File userConfig)
-
addProperties
public void addProperties(Properties props)
Adds the Properties structure to the broker configuration. Earlier configuration sources take precedence over later sources.
-
addProperties
public void addProperties(org.apache.commons.configuration2.PropertiesConfiguration props)
Adds the PropertiesConfiguration to the broker configuration. Earlier configuration sources take precedence over later sources.
-
configureMe
public void configureMe(Object target)
-
configureInstances
public Collection<?> configureInstances(Class<?> target)
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext context) throws org.springframework.beans.BeansException- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
-