|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.tomgibara.pronto.control.ControlFactory
public abstract class ControlFactory
Instances of this class are responsible for creating Controller
objects from ControllerSettings interface.
Only one instance of a ControlFactory is available through the
getInstance() method. The default implementation returned by
this static method can be changed by assigning the system property
com.tomgibara.pronto.control.factory the name of a class which
extends this abstract base class.
| Constructor Summary | |
|---|---|
ControlFactory()
|
|
| Method Summary | ||
|---|---|---|
static ControlFactory |
getInstance()
Should be called to obtain a ConfigFactory instance. |
|
abstract boolean |
isSettingsIfaceSupported(java.lang.Class<? extends ControllerSettings> iface)
Indicates whether the interface supplied is recognized by this factory. |
|
abstract
|
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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ControlFactory()
| Method Detail |
|---|
public static ControlFactory getInstance()
throws com.tomgibara.pronto.core.ProntoException
ConfigFactory instance. This
method is the single entry-point to configuration functionality in the
pronto framework.
com.tomgibara.pronto.core.ProntoException - if the factory instance could not be createdpublic abstract boolean isSettingsIfaceSupported(java.lang.Class<? extends ControllerSettings> iface)
newController method to create Controller
objects.
iface - an interface whose instances may be used to create a new
controller
public abstract <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 java.lang.IllegalArgumentException,
ProntoControlException
S - the engine's state typeL - the engine's label typeP - the engine's parameter typesettings - 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
java.lang.IllegalArgumentException - if the type of settings is not recognized by this factory
ProntoControlException - if the settings supplied were invalid
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||