com.tomgibara.pronto.control.impl
Class ControlFactoryImpl
java.lang.Object
com.tomgibara.pronto.control.ControlFactory
com.tomgibara.pronto.control.impl.ControlFactoryImpl
public class ControlFactoryImpl
- extends ControlFactory
The standard implementation of the ControlFactory interface.
- Author:
- Tom Gibara
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ControlFactoryImpl
public ControlFactoryImpl()
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 typeL - the engine's label typeP - 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.