public class BDIAgentFactory extends Object implements IDynamicBDIFactory, IComponentFactory
Modifier and Type | Field and Description |
---|---|
static String |
FILETYPE_BDIAGENT
The BDI agent file type.
|
static String |
FILETYPE_BDICAPABILITY
The BDI capability file type.
|
Constructor and Description |
---|
BDIAgentFactory(Map props)
Create a new agent factory.
|
BDIAgentFactory(Map props,
IInternalAccess component)
Create a new agent factory.
|
Modifier and Type | Method and Description |
---|---|
IMECapability |
createAgentModel(String name,
String pkg,
String[] imports)
Create a new agent model, which can be manually edited before
starting.
|
IFuture<Tuple2<IComponentInstance,IComponentAdapter>> |
createComponentInstance(IComponentDescription desc,
IComponentAdapterFactory factory,
IModelInfo modelinfo,
String config,
Map arguments,
IExternalAccess parent,
RequiredServiceBinding[] bindings,
boolean copy,
Future<Tuple2<IComponentInstance,IComponentAdapter>> ret)
Create a component instance.
|
Tuple2<IComponentInstance,IComponentAdapter> |
createComponentInstance(IComponentDescription desc,
IComponentAdapterFactory factory,
OAVAgentModel amodel,
String config,
Map arguments,
IExternalAccess parent,
RequiredServiceBinding[] bindings,
boolean copy,
Future<Tuple2<IComponentInstance,IComponentAdapter>> ret)
Create a component instance.
|
IFuture<String> |
getComponentType(String model,
String[] imports,
ClassLoader classloader)
Get the component type of a model.
|
IFuture<Icon> |
getComponentTypeIcon(String type)
Get a default icon for a file type.
|
String[] |
getComponentTypes()
Get the names of ADF file types supported by this factory.
|
Map |
getProperties(String type)
Get the properties.
|
IFuture<Boolean> |
isLoadable(String model,
String[] imports,
ClassLoader classloader)
Test if a model can be loaded by the factory.
|
IFuture<Boolean> |
isStartable(String model,
String[] imports,
ClassLoader classloader)
Test if a model is startable (e.g. an component).
|
IFuture<IModelInfo> |
loadModel(String filename,
String[] imports,
ClassLoader classloader)
Load a model.
|
IModelInfo |
registerAgentModel(IMECapability model,
String filename)
Register a manually edited agent model in the factory.
|
IFuture |
shutdownService()
Shutdown the service.
|
IFuture |
startService()
Start the service.
|
public static final String FILETYPE_BDIAGENT
public static final String FILETYPE_BDICAPABILITY
public BDIAgentFactory(Map props, IInternalAccess component)
public BDIAgentFactory(Map props)
public IFuture startService()
public IFuture shutdownService()
listener
- The listener.public IFuture<Tuple2<IComponentInstance,IComponentAdapter>> createComponentInstance(IComponentDescription desc, IComponentAdapterFactory factory, IModelInfo modelinfo, String config, Map arguments, IExternalAccess parent, RequiredServiceBinding[] bindings, boolean copy, Future<Tuple2<IComponentInstance,IComponentAdapter>> ret)
createComponentInstance
in interface IComponentFactory
adapter
- The component adapter.model
- The component model.config
- The name of the configuration (or null for default configuration)arguments
- The arguments for the agent as name/value pairs.parent
- The parent component (if any).public Tuple2<IComponentInstance,IComponentAdapter> createComponentInstance(IComponentDescription desc, IComponentAdapterFactory factory, OAVAgentModel amodel, String config, Map arguments, IExternalAccess parent, RequiredServiceBinding[] bindings, boolean copy, Future<Tuple2<IComponentInstance,IComponentAdapter>> ret)
adapter
- The component adapter.model
- The component model.config
- The name of the configuration (or null for default configuration)arguments
- The arguments for the agent as name/value pairs.parent
- The parent component (if any).public IFuture<IModelInfo> loadModel(String filename, String[] imports, ClassLoader classloader)
loadModel
in interface IComponentFactory
filename
- The model (e.g. file name).The
- imports (if any).public IFuture<Boolean> isLoadable(String model, String[] imports, ClassLoader classloader)
isLoadable
in interface IComponentFactory
model
- The model (e.g. file name).The
- imports (if any).public IFuture<Boolean> isStartable(String model, String[] imports, ClassLoader classloader)
isStartable
in interface IComponentFactory
model
- The model (e.g. file name).The
- imports (if any).public String[] getComponentTypes()
getComponentTypes
in interface IComponentFactory
public IFuture<Icon> getComponentTypeIcon(String type)
getComponentTypeIcon
in interface IComponentFactory
public IFuture<String> getComponentType(String model, String[] imports, ClassLoader classloader)
getComponentType
in interface IComponentFactory
model
- The model (e.g. file name).The
- imports (if any).public Map getProperties(String type)
getProperties
in interface IComponentFactory
type
- The component type.public IMECapability createAgentModel(String name, String pkg, String[] imports)
createAgentModel
in interface IDynamicBDIFactory
name
- A type name for the agent model.pkg
- Optional package for the model.imports
- Optional imports for the model.public IModelInfo registerAgentModel(IMECapability model, String filename)
registerAgentModel
in interface IDynamicBDIFactory
model
- The edited agent model.filename
- The filename for accessing the model.Copyright © 2012. All Rights Reserved.