Interface IComponentFactory
-
- All Known Subinterfaces:
IBootstrapFactory
- All Known Implementing Classes:
BDIAgentFactory
,BDIXComponentFactory
,BpmnFactory
,KernelMultiAgent
,MicroAgentFactory
,MicroserviceFactory
public interface IComponentFactory
A factory is responsible for one or more component types and is capable of loading component models from files as well as providing component features.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IFuture<java.util.Collection<IComponentFeatureFactory>>
getComponentFeatures(IModelInfo model)
Get the component features for a model.IFuture<java.lang.String>
getComponentType(java.lang.String model, java.lang.String[] imports, IResourceIdentifier rid)
Get the component type of a model.IFuture<byte[]>
getComponentTypeIcon(java.lang.String type)
Get a default icon for a component type.java.lang.String[]
getComponentTypes()
Get the names of component types supported by this factory.java.util.Map<java.lang.String,java.lang.Object>
getProperties(java.lang.String type)
Get the properties (name/value pairs).IFuture<java.lang.Boolean>
isLoadable(java.lang.String model, java.lang.String[] imports, IResourceIdentifier rid)
Test if a model can be loaded by the factory.IFuture<java.lang.Boolean>
isStartable(java.lang.String model, java.lang.String[] imports, IResourceIdentifier rid)
Test if a model is startable (e.g.IFuture<IModelInfo>
loadModel(java.lang.String model, java.lang.String[] imports, IResourceIdentifier rid)
Load a model.
-
-
-
Method Detail
-
getComponentTypeIcon
IFuture<byte[]> getComponentTypeIcon(java.lang.String type)
Get a default icon for a component type.
-
loadModel
IFuture<IModelInfo> loadModel(java.lang.String model, java.lang.String[] imports, IResourceIdentifier rid)
Load a model.- Parameters:
model
- The model (e.g. file name or resource name).The
- imports (if any).- Returns:
- The loaded model.
-
isLoadable
IFuture<java.lang.Boolean> isLoadable(java.lang.String model, java.lang.String[] imports, IResourceIdentifier rid)
Test if a model can be loaded by the factory.- Parameters:
model
- The model (e.g. file name or resource name).The
- imports (if any).- Returns:
- True, if model can be loaded.
-
isStartable
IFuture<java.lang.Boolean> isStartable(java.lang.String model, java.lang.String[] imports, IResourceIdentifier rid)
Test if a model is startable (e.g. an component).- Parameters:
model
- The model (e.g. file name or resource name).The
- imports (if any).- Returns:
- True, if startable (and loadable).
-
getComponentType
IFuture<java.lang.String> getComponentType(java.lang.String model, java.lang.String[] imports, IResourceIdentifier rid)
Get the component type of a model.- Parameters:
model
- The model (e.g. file name or resource name).The
- imports (if any).
-
getComponentTypes
java.lang.String[] getComponentTypes()
Get the names of component types supported by this factory.
-
getProperties
java.util.Map<java.lang.String,java.lang.Object> getProperties(java.lang.String type)
Get the properties (name/value pairs). Arbitrary properties that can e.g. be used to define kernel-specific settings to configure tools.- Parameters:
type
- The component type.- Returns:
- The properties or null, if the component type is not supported by this factory.
-
getComponentFeatures
IFuture<java.util.Collection<IComponentFeatureFactory>> getComponentFeatures(IModelInfo model)
Get the component features for a model.- Parameters:
model
- The component model.- Returns:
- The component features.
-
-