com.tomgibara.pronto.control.impl
Class ControlFactoryImpl

java.lang.Object
  extended by com.tomgibara.pronto.control.ControlFactory
      extended by com.tomgibara.pronto.control.impl.ControlFactoryImpl

public class ControlFactoryImpl
extends ControlFactory

The standard implementation of the ControlFactory interface.

Author:
Tom Gibara

Constructor Summary
ControlFactoryImpl()
           
 
Method Summary
 boolean isSettingsIfaceSupported(java.lang.Class<? extends ControllerSettings> iface)
          Indicates whether the interface supplied is recognized by this factory.
<S,L,P> Controller<S,L,P>
newController(ControllerSettings settings, com.tomgibara.pronto.state.StateEngine<S,L,P> engine, EngineControlAdapter<S,L,P> adapter)
          Constructs a new controller.
 
Methods inherited from class com.tomgibara.pronto.control.ControlFactory
getInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ControlFactoryImpl

public ControlFactoryImpl()
Method Detail

isSettingsIfaceSupported

public boolean isSettingsIfaceSupported(java.lang.Class<? extends ControllerSettings> iface)
Description copied from class: ControlFactory
Indicates whether the interface supplied is recognized by this factory. Implementations of recognized interfaces may be passed to the newController method to create Controller objects.

Specified by:
isSettingsIfaceSupported in class ControlFactory
Parameters:
iface - an interface whose instances may be used to create a new controller
Returns:
whether the factory can generate a controller from the supplied interface

newController

public <S,L,P> Controller<S,L,P> newController(ControllerSettings settings,
                                               com.tomgibara.pronto.state.StateEngine<S,L,P> engine,
                                               EngineControlAdapter<S,L,P> adapter)
                                throws ProntoControlException
Description copied from class: ControlFactory
Constructs a new controller.

Specified by:
newController in class ControlFactory
Type Parameters:
S - the engine's state type
L - the engine's label type
P - the engine's parameter type
Parameters:
settings - the settings that define the new controller.
engine - the engine that will be operated by the controller.
adapter - the adapter that mediates external data and the state graph
Returns:
a new controller, the operation of which is defined by the supplied settings.
Throws:
ProntoControlException - if the settings supplied were invalid


Copyright © 2006-2007 Tom Gibara. All Rights Reserved.