org.powertac.common.interfaces
Interface ServerConfiguration


public interface ServerConfiguration

Support for annotation-driven configuration. Configurable services, including services that create configurable instances (such as gencos or customer models), configure themselves by calling configure(). The result is that properties annotated as @ConfigurableValue will be matched with configuration data, and classes annotated as @ConfigurableInstance will have instances created and configured as specified in the server configuration.

Author:
John Collins

Method Summary
 Collection<?> configureInstances(Class<?> target)
          Creates and configures potentially multiple instances of a target class annotated as @ConfigurableInstance.
 void configureMe(Object target)
          Configures a target object by matching configuration clauses with
 void publishConfiguration(Object target)
          Gathers public configuration data for publication to brokers.
 

Method Detail

configureMe

void configureMe(Object target)
Configures a target object by matching configuration clauses with


configureInstances

Collection<?> configureInstances(Class<?> target)
Creates and configures potentially multiple instances of a target class annotated as @ConfigurableInstance. Returns the created instances in a list in no particular order.


publishConfiguration

void publishConfiguration(Object target)
Gathers public configuration data for publication to brokers. Data is gathered from @ConfigurableValue properties with publish=true. Note that such properties must either be fields, or have a "standard" getter, or must specify a getter that produces the value as a String. This is typically called at the end of the initialize() method.



Copyright © 2012 Power TAC. All Rights Reserved.