org.robokind.api.common.services
Interface ConfigurationLoader<ServiceConfig,Param>

Type Parameters:
ServiceConfig - Service Configuration Class returned by this loader
Param - Parameter Class passed in to this loader

public interface ConfigurationLoader<ServiceConfig,Param>

An ConfigurationLoader loads a ServiceConfig with a specific version. The ServiceConfig is used to connect to some Service such as: Servos, Microphone, Text-to-Speech, Face Tracking, etc...

Author:
Matthew Stevenson

Method Summary
 Class<ServiceConfig> getConfigurationClass()
          Returns the Class of the ServiceConfig to be loaded.
 VersionProperty getConfigurationFormat()
          Specifies the Service Configuration Format version which can be loaded.
 Class<Param> getParameterClass()
          Returns the Class of the Parameter required to load a ServiceConfig.
 ServiceConfig loadConfiguration(Param param)
          Loads a ServiceConfig of the specified type from the given parameters.
 

Method Detail

getConfigurationFormat

VersionProperty getConfigurationFormat()
Specifies the Service Configuration Format version which can be loaded.

Returns:
VersionProperty specifying the Service Configuration Format to load

loadConfiguration

ServiceConfig loadConfiguration(Param param)
                                throws Exception
Loads a ServiceConfig of the specified type from the given parameters.

Parameters:
param - parameters needed to load the ServiceConfig
Returns:
ServiceConfig of the specified type from the given parameters
Throws:
Exception - if there is an error loading the configuration

getConfigurationClass

Class<ServiceConfig> getConfigurationClass()
Returns the Class of the ServiceConfig to be loaded.

Returns:
Class of the ServiceConfig to be loaded

getParameterClass

Class<Param> getParameterClass()
Returns the Class of the Parameter required to load a ServiceConfig.

Returns:
Class of the Parameter required to load a ServiceConfig


Copyright © 2011-2013. All Rights Reserved.