public class MetaFactoryAI
extends java.lang.Object
query_process
scripting package.Constructor and Description |
---|
MetaFactoryAI()
Create a new instance of MetaFactoryAI
|
Modifier and Type | Method and Description |
---|---|
org.licas_xml.abs.Element |
createAM_Module(java.lang.String moduleType,
java.lang.String className,
java.lang.String jarFile,
org.licas_xml.abs.Element policy)
Create an XML element that can be used to define one of the
AutonomicManager
modules. |
org.licas_xml.abs.Element |
createAutonomicManager(java.lang.String className,
java.lang.String jarFile)
Create an XML element that can be used as the base part of a script to define
an
AutonomicManager setup. |
org.licas_xml.abs.Element |
createAutonomicManagerDefault()
Create an XML element that can be used as the base part of a script to define
an
AutonomicManagerDefault setup. |
org.licas_xml.abs.Element |
createDataAction(java.lang.String dataType,
java.lang.Object infoData,
java.lang.String actionType)
Create an XML element that can be used as part of a script to define a data resource.
|
org.licas_xml.abs.Element |
createSolver(java.util.HashMap<java.lang.String,java.lang.String> typeValue)
Create an XML element that can be used as part of an admin script to initialise a
service that is used with the problem solving classes.
|
public org.licas_xml.abs.Element createAutonomicManager(java.lang.String className, java.lang.String jarFile)
AutonomicManager
setup. Both parameters can be null, when this script is
still useful, as you can then add specific AM module descriptions to it.className
- the class name of the autonomic manager to load. This can be null,
when the default AutonomicManagerDefault
version will be used instead.jarFile
- the main jar file if the manager is from an external source. The
system should try to also retrieve the jars from an associated lib
folder,
but it is better to pack all new classes in a single jar and make that available.
This can also be null if the jar already exists or the default version is used.<Autonomic_Manager><Class_Name>Optional AM class name</Class_Name>
<Jar_File>Optional AM jar file path</Jar_File></Autonomic_Manager>
public org.licas_xml.abs.Element createAutonomicManagerDefault()
AutonomicManagerDefault
setup. The classes used are the default ones
and so do not need to be entered.<Autonomic_Manager><Class_Name>AutonomicManagerDefault</Class_Name>
<Jar_File>Null as licas package</Jar_File></Autonomic_Manager>
public org.licas_xml.abs.Element createAM_Module(java.lang.String moduleType, java.lang.String className, java.lang.String jarFile, org.licas_xml.abs.Element policy)
AutonomicManager
modules. This should then be added directly to the AM script root element.moduleType
- the module type. Can be AiConst.MONITOR
, AiConst.ANALYZE
,
AiConst.PLAN
, or AiConst.EXECUTE
.className
- the class name of the autonomic module to load. This can be null,
when the default version will be used instead.jarFile
- the jar file path if the manager is from an external source.
This can also be null if the jar already exists or the default version is used.policy
- the policy script that defines what the module should evaluate and
how the module should respond. This is required, but you can use MetaFactory
.createPolicy
to create an empty one.<Module_Type><Class_Name>Optional module class name</Class_Name>
<Jar_File>Optional module jar file path</Jar_File><Policy>Policy script here</Policy></Module_Type>
public org.licas_xml.abs.Element createDataAction(java.lang.String dataType, java.lang.Object infoData, java.lang.String actionType) throws java.lang.Exception
Data
section and it stores a
description of a data type, value and specific action. It is used to initialise
an InformationService
class, for example. The related Resource
object that
stores and retrieves the information gets created from it and might be a best
match guess. If the action is known, then the resource can perform a different
type of storage, for example.
The returned value is <Data><DataType>dataType</DataType><Value>String or XML infoData</Value>
<ActionType>actionType</ActionType></Data>
.dataType
- the data type of the value, or its class name.infoData
- the data itself, can be a String or XML element.actionType
- the type of action to take, if it is an option.java.lang.Exception
- any error.public org.licas_xml.abs.Element createSolver(java.util.HashMap<java.lang.String,java.lang.String> typeValue)
MetaConst.AISOLVER
element.typeValue
- the variable list. Key is variable name and value is variable value,
both of type String.