public class BDIAgentFactory extends BasicService implements IComponentFactory, IBootstrapFactory
Modifier and Type | Field and Description |
---|---|
static java.util.Collection<IComponentFeatureFactory> |
BDI_FEATURES
The specific component features for micro agents.
|
static java.lang.String |
CAPA_TYPE
The model type identifier for a capability.
|
protected java.util.Collection<IComponentFeatureFactory> |
features
The standard + micro component features.
|
static java.lang.String |
FILETYPE_BDIAGENT
The BDI agent model type name (human readable for display).
|
static java.lang.String |
FILETYPE_BDICAPA
The BDI capability model type name (human readable for display).
|
protected static LazyResource |
ICON
The image icon.
|
protected ILibraryService |
libservice
The library service.
|
protected ILibraryServiceListener |
libservicelistener
The library service listener
|
protected BDIModelLoader |
loader
The application model loader.
|
protected IInternalAccess |
provider
The platform.
|
static java.lang.String |
TYPE
The model type identifier for use in the @Agent annotation.
|
idcnt, impltype, internalaccess, providerid, shutdowned, sid, started, type
EMPTY_SERVICES
Constructor and Description |
---|
BDIAgentFactory(IInternalAccess provider)
Create a new agent factory.
|
BDIAgentFactory(IInternalAccess provider,
java.util.Map<java.lang.String,java.lang.Object> properties)
Create a new agent factory.
|
BDIAgentFactory(java.lang.String providerid)
Create a new agent factory for startup.
|
Modifier and Type | Method and Description |
---|---|
static void |
addExcludedMethods(java.util.Map<java.lang.String,java.lang.String[]> props,
java.lang.String[] excludes)
Add excluded methods.
|
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 file type.
|
java.lang.String[] |
getComponentTypes()
Get the names of ADF file types supported by this factory.
|
protected ILibraryService |
getLibraryService()
Get the library service
|
static java.lang.String |
getLoadableType(SClassReader.ClassInfo ci)
Get the model type from the class info.
|
java.util.Map<java.lang.String,java.lang.Object> |
getProperties(java.lang.String type)
Get the properties.
|
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<SClassReader.ClassInfo> |
loadClassInfo0(java.lang.String model,
java.lang.String[] imports,
IResourceIdentifier rid)
Load the class info for the model.
|
IFuture<IModelInfo> |
loadModel(java.lang.String model,
java.lang.String[] imports,
IResourceIdentifier rid)
Load a model.
|
IFuture<java.lang.Void> |
shutdownService()
Shutdown the service.
|
IFuture<java.lang.Void> |
startService()
Start the service.
|
IFuture<java.lang.Void> |
startService(IInternalAccess component,
IResourceIdentifier rid)
Start the service.
|
createServiceIdentifier, createServiceIdentifier, equals, generateServiceName, getInterfaceType, getInternalAccess, getInvokeMethod, getMethodInfos, getMethodTimeout, getPropertyMap, getProviderId, getServiceId, hashCode, initNFProperties, invokeMethod, isValid, setComponentAccess, setPropertyMap, setServiceIdentifier, toString
public static final java.lang.String FILETYPE_BDIAGENT
public static final java.lang.String FILETYPE_BDICAPA
public static final java.lang.String TYPE
public static final java.lang.String CAPA_TYPE
protected static final LazyResource ICON
public static final java.util.Collection<IComponentFeatureFactory> BDI_FEATURES
protected BDIModelLoader loader
protected IInternalAccess provider
protected ILibraryService libservice
protected ILibraryServiceListener libservicelistener
protected java.util.Collection<IComponentFeatureFactory> features
public BDIAgentFactory(IInternalAccess provider)
public BDIAgentFactory(IInternalAccess provider, java.util.Map<java.lang.String,java.lang.Object> properties)
public BDIAgentFactory(java.lang.String providerid)
platform
- The platform.public IFuture<java.lang.Void> startService(IInternalAccess component, IResourceIdentifier rid)
startService
in interface IBootstrapFactory
component
- The component.rid
- The resource identifier.public IFuture<java.lang.Void> startService()
startService
in interface IInternalService
startService
in class BasicService
public IFuture<java.lang.Void> shutdownService()
shutdownService
in interface IInternalService
shutdownService
in class BasicService
listener
- The listener.public IFuture<java.util.Collection<IComponentFeatureFactory>> getComponentFeatures(IModelInfo model)
getComponentFeatures
in interface IComponentFactory
model
- The component model.public IFuture<IModelInfo> loadModel(java.lang.String model, java.lang.String[] imports, IResourceIdentifier rid)
loadModel
in interface IComponentFactory
model
- The model (e.g. file name).The
- imports (if any).public IFuture<java.lang.Boolean> isLoadable(java.lang.String model, java.lang.String[] imports, IResourceIdentifier rid)
isLoadable
in interface IComponentFactory
model
- The model (e.g. file name).The
- imports (if any).public static java.lang.String getLoadableType(SClassReader.ClassInfo ci)
public IFuture<SClassReader.ClassInfo> loadClassInfo0(java.lang.String model, java.lang.String[] imports, IResourceIdentifier rid)
protected ILibraryService getLibraryService()
public IFuture<java.lang.Boolean> isStartable(java.lang.String model, java.lang.String[] imports, IResourceIdentifier rid)
isStartable
in interface IComponentFactory
model
- The model (e.g. file name).The
- imports (if any).public java.lang.String[] getComponentTypes()
getComponentTypes
in interface IComponentFactory
public IFuture<byte[]> getComponentTypeIcon(java.lang.String type)
getComponentTypeIcon
in interface IComponentFactory
public IFuture<java.lang.String> getComponentType(java.lang.String model, java.lang.String[] imports, IResourceIdentifier rid)
getComponentType
in interface IComponentFactory
model
- The model (e.g. file name).The
- imports (if any).public java.util.Map<java.lang.String,java.lang.Object> getProperties(java.lang.String type)
getProperties
in interface IComponentFactory
type
- The component type.public static void addExcludedMethods(java.util.Map<java.lang.String,java.lang.String[]> props, java.lang.String[] excludes)