org.robokind.api.common.services
Class EmptyFactory<T>

java.lang.Object
  extended by org.robokind.api.common.services.EmptyFactory<T>
All Implemented Interfaces:
ServiceFactory<T,T>

public class EmptyFactory<T>
extends Object
implements ServiceFactory<T,T>

Author:
Matthew Stevenson

Field Summary
 
Fields inherited from interface org.robokind.api.common.services.ServiceFactory
PROP_SERVICE_CLASS, PROP_SERVICE_VERSION
 
Constructor Summary
EmptyFactory(Class<T> clazz, VersionProperty serviceVersion)
           
 
Method Summary
 T build(T config)
          Builds a new instance of a Service from the given ServiceConfig.
 Class<T> getServiceClass()
          Returns the Class of the Service connected to.
 Class<T> getServiceConfigurationClass()
          Returns the Class of ServiceConfig required to build to this type of Service.
 VersionProperty getServiceVersion()
          Returns the VersionProperty of the Service this connects to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmptyFactory

public EmptyFactory(Class<T> clazz,
                    VersionProperty serviceVersion)
Method Detail

getServiceVersion

public VersionProperty getServiceVersion()
Description copied from interface: ServiceFactory
Returns the VersionProperty of the Service this connects to.

Specified by:
getServiceVersion in interface ServiceFactory<T,T>
Returns:
VersionProperty of the Service this connects to

build

public T build(T config)
Description copied from interface: ServiceFactory
Builds a new instance of a Service from the given ServiceConfig. The Service built is defined by the ServiceVersion. * Examples: Servo Controllers, Microphones, Text-to-speech, Face Tracking.

Specified by:
build in interface ServiceFactory<T,T>
Parameters:
config - Configuration parameters used to build to the IO.
Returns:
input and/or output interface specified by the config

getServiceClass

public Class<T> getServiceClass()
Description copied from interface: ServiceFactory
Returns the Class of the Service connected to.

Specified by:
getServiceClass in interface ServiceFactory<T,T>
Returns:
Class of the Service connected to

getServiceConfigurationClass

public Class<T> getServiceConfigurationClass()
Description copied from interface: ServiceFactory
Returns the Class of ServiceConfig required to build to this type of Service.

Specified by:
getServiceConfigurationClass in interface ServiceFactory<T,T>
Returns:
Class of ServiceConfig required to build to this type of Service


Copyright © 2011. All Rights Reserved.