org.objectweb.fractal.adl
Class BasicFactory
- BindingController, Factory
public class BasicFactory
implements BindingController, Factory
Basic implementation of the
Factory
interface. This implementation
uses a
Loader
to load ADL definitions, a
Compiler
to compile
them, and a
Scheduler
to execute the compiled tasks.
void | bindFc(String itf, Object value)
|
String[] | listFc()
|
Object | lookupFc(String itf)
|
Object | newComponent(String name, Map context) - Creates a new instance of the component whose name is given.
|
void | unbindFc(String itf)
|
COMPILER_BINDING
public static final String COMPILER_BINDING
Name of the client interface bound to the
Compiler
used by this
factory.
LOADER_BINDING
public static final String LOADER_BINDING
Name of the client interface bound to the
Loader
used by this
factory.
SCHEDULER_BINDING
public static final String SCHEDULER_BINDING
Name of the client interface bound to the Scheduler
used by this
factory.
scheduler
public Scheduler scheduler
The Scheduler
used by this factory.
bindFc
public void bindFc(String itf,
Object value)
listFc
public String[] listFc()
lookupFc
public Object lookupFc(String itf)
newComponent
public Object newComponent(String name,
Map context)
throws ADLException
Creates a new instance of the component whose name is given. This can be
done by loading the ADL definition of this name, by compiling it into a
set of tasks and by executing these tasks in the proper order.
- newComponent in interface Factory
name
- the name of the component to be created.context
- optional additional information.
- the component that has been created. The type of this result
depends on the implementation of this interface: it can be a Fractal
component reference (if this factory creates Fractal components), it
can be an identifier (if this factory generates source code that will
create components, instead of directly creating components), etc.
ADLException
- if a problem occurs during the creation of the
component.
unbindFc
public void unbindFc(String itf)