Sommario
Nota
In questo documento, quando si fa riferimento a percorsi di file o directory, <home-installazione> rappresenta la directory in cui è stato decompresso il pacchetto dell'Agent Controller.
The pluginconfig.xml file resides under <install-home>\plugins\<plugin-name>\config. It is the mechanism for extending the global environment and application aliases defined in serviceconfig.xml according to the needs of individually bundled applications. Extending the environment settings defined in serviceconfig.xml has an impact on all applications (including agents) launched by the Agent Controller, as they all inherit that environment. This allows a "plugin" to make its applications locatable by other processes started by the Agent Controller (e.g., by adding its path to the CLASSPATH env var). Extending the application alias list is the means for a new application to be launched if the Agent Controller is configured to restrict its launching services to only those in the list.
Thus, pluginconfig.xml provides a mechanism for packaging add-on components which are optional for the basic install of the Agent Controller. Since the serviceconfig.xml file itself is not modified, the removal of the add-ons is equally easy.
Agents may require both a pluginconfig.xml and an agent.xml. The agent.xml file is required to define an agent application if you want the new agent controller to when looking for available agents (i.e., be able to discover it). The pluginconfig.xml is required if the agent needs to extend the serviceconfig.xml environment or alias list. The use of the agent.xml file will replace the use of pluginconfig.xml in a future release.
Nota
The term "plugin" used here is only a loose reference to an Eclipse plug-in. It came about because actual plug-ins were used initially. But now it is a misnomer, as this configuration file can refer to any application without its being wrapped up as a plug-in suitable for installation into the Eclipse workbench.
The pluginconfig.xml file contains the following main segments:
The hierarchy of the elements contained in the pluginconfig.xml file is shown below. L'ordine degli elementi appartenenti allo stesso livello non è rilevante. I collegamenti ipertestuali nella gerarchia conducono alla descrizione formale dell'elemento nella sezione Elementi e attributi.
PluginConfiguration
AgentControllerEnvironment
Variable
Option
Application
Variable
Parameter
Agent
Option
Elemento: PluginConfiguration
Elementi secondari: AgentControllerEnvironment
Option
Application
Agent
- requires
- (optional) This string value is a comma-separated list of plug-in name(s) which this configuration is dependent upon. Come in TPTP 4.0, ai nomi dei plugin è stato aggiunto un identificativo di versione. Consiste in un carattere di sottolineatura seguito dal numero di versione del rilascio. Ad esempio: org.eclipse.tptp.platform.agentcontroller_4.0.0. To ensure plug-in compatibility for applications that have dependencies on plug-ins from earlier releases (plug-ins that do not have a version identifier suffix), you have the option of specifying the plug-in name for the "requires" attribute excluding the version identifier. In questo caso, il caricatore della configurazione di Agent Controller tenterà di individuare il nome del plugin completo incluso il suffisso dell'identificativo della versione. Se l'operazione ha esito negativo, il caricatore della configurazione ricercherà il nome del plugin escludendo il suffisso dell'identificativo della versione. Nel caso in cui ci fossero più plugin con lo stesso nome, verrà utilizzato il primo nome di plugin restituito dal sistema operativo.
Used by: PluginConfiguration
Elementi secondari: Variable
This Variable element defines an environment variable and how it should be positioned within the existing environment to form the new default environment for all applications and agents launched. Per un elemento AgentControllerEnvironment possono essere definiti uno o più di questi elementi.
Utilizzato da: AgentControllerEnvironment
Attributi:
- name
- This string value specifies the name of the environment variable.
- value
- This string value specifies the value of the environment variable.
- position
- (optional) This string value is one of "append", "prepend", or "replace", indicating where to place this environment relative to the existing default environment.
Elemento: Option
An Option as a top element in
PluginConfiguration is used to specify arbitrary configuration data that will be
passed to every agent that registers itself with the Agent Controller. This
information is included in the property information returned for every agent, to
a client. The agent can interpret this information (or not) as it sees fit.
Option information is only given to agents that are using the original API
(backwards compatibility layers) of the Agent Controller. Use the agent.xml
configuration file for providing configuration information to an agent using the
new API.
Elemento: ApplicationUtilizzato da: Agent
Attributi:
- name
- This string value specifies the namespace for the option.
- tipo
- This string value specifies the name of the option.
- value
- This string specifies the value of the option.
Used by: PluginConfiguration
Elementi secondari: Variable
- executable
- This string value specifies the alias name for the application executable specified in the path attribute. Clients must use this name to identify this application. If the extends attribute is also specified, the name given here should match a previously defined alias.
- path
- This string value specifies the full pathname of the application to launch. Viene utilizzato al posto del nome alias quando si avvia l'eseguibile dell'applicazione.
The attribute is ignored if the extends attribute is specified.- location
- (optional) This string value specifies the directory from which the executable is to be launched, sometimes referred to as the working directory for the executable while it is running.
- extends
- (optional) This string value specifies the configuration name for a previously defined application alias. However, configuration names are not supported so the value of this attribute should be set to "default". If extends is present (regardless of value), it indicates that the information contained in this Application should extend the launch information previously defined in the matching application alias. It is not allowed to change the path value (i.e., executable being launched). If no match to the executable name is found, this Application element has no effect.
Elemento: Variable
Questo elemento Variable definisce una variabile di ambiente e la sua posizione nell'ambiente esistente quando si avvia
l'applicazione.
Per un elemento
Application possono essere definiti uno o più di questi elementi.
Utilizzato da: Application
Attributi:
- name
- This string value specifies the name of the environment variable.
- value
- This string value specifies the value of the environment variable.
- position
- (optional) This string value is one of "append", "prepend", or "replace", indicating where to place this environment relative to the default environment.
L'elemento Parameter definisce un argomento di riga comandi da fornire all'applicazione quando viene avviata. Per un elemento Application possono essere definiti uno o più di questi elementi.
Utilizzato da: Application
Attributi:
- value
- This string value specifies a command line argument.
- position
- (optional) This string value is one of "append", "prepend", or "replace" indicating where to place this argument relative to the existing command line arguments.
Elemento: Agent
Provides configuration
information for a particular agent. Only used by agents that are using the
original
API (backwards compatibility layers) of the Agent Controller. Use the agent.xml
configuration file for providing configuration information to an agent using the
new API.
Used by: PluginConfiguration
Elementi secondari: Option
Attributi:
- name
- This string value specifies the name of the agent to which this configuration information should be applied.
- tipo
- (optional) This string value specifies a type of agent.
- dataChannelSize
- (optional) This string value specifies the amount of shared memory to allocate for inter-process communication. The values take the form of a positive integer with the suffix M or K to indicate Megabyte or Kilobytes, respectively, or no suffix which indicates bytes. Example values: "16M", "8K", or "16000".
- logFile
- (optional) This string specifies a fully qualified pathname of a file. If specified, the data which would normally go through the data channel to the client will be written to this file instead.
- client
- (optional) This string specifies whether this agent is interacting with a client. The possible values are "DYNAMIC" or "HEADLESS". HEADLESS indicates there is no associated client. The default is DYNAMIC.
- extends
- (optional) This string value specifies the configuration name for a previously defined Agent. However, configuration names are not supported so the value of this attribute should be set to "default". If extends is present (regardless of value), it indicates that the information contained in this Agent should extend the configuration information previously defined in the matching Agent element. Used to expand the list of Options associated with a particular agent.
Elemento: Option
An Option
sub-element within an Agent element is used to specify arbitrary
configuration data that will be passed to the agent when it registers itself
with the Agent Controller. The agent can interpret this information (or
not) as it sees fit.
Utilizzato da: Agent
Attributi:
- name
- an arbitrary string naming the option (i.e. namespace)
- tipo
- an arbitrary string naming the type of the option (i.e. option name)
- value
- an arbitrary string value for the option
<PluginConfiguration requires="org.eclipse.tptp.platform.collection.framework">
<AgentControllerEnvironment>
<Variable name="CLASSPATH_MY_AGENTS"
position="append"
value="%PLUGINS_HOME%\org.eclipse.tptp.myagents\lib\coreagent.jar"
/>
</AgentControllerEnvironment>
<Application
executable="MyAgent"
location="%SYS_TEMP_DIR%"
path="%JAVA_PATH%">
<Variable name="CLASSPATH"
position="append"
value="%PLUGINS_HOME%\org.eclipse.tptp.myagents\jmx\lib\jmxagent.jar"
/>
<Variable name="CLASSPATH"
position="append"
value="%CLASSPATH_MY_AGENTS%"
/>
<Parameter position="append"
value="-Dapp_home=%MY_HOME%"
/>
<Parameter position="append"
value="-DagentXML=%PLUGINS_HOME%
\org.eclipse.tptp.myagents\jmx\agentXML\MyAgent.xml"
/>
</Application>
<Option name="org.eclipse.tptp.Myagents"
type="version" value="2.0"/>
</PluginConfiguration>
Riferimenti correlati
Panoramica sulla configurazione di agenti e Agent Controller
Copyright (C) 2006 Intel Corporation.