<!-- ======================================================================= -->
<!-- File:  serviceconfig.dtd                                                -->
<!-- Location:  <install_path>\config                                        -->
<!--                                                                         -->
<!-- Description:  This is the grammer used the agent controller to          -->
<!--               create the desired environment.                           -->
<!--                                                                         -->
<!-- Author:  Richard K. Duggan                                              -->
<!-- ======================================================================= -->


<!-- AGENT CONTROLLER CONFIGURATION                                         -->
<!-- The root of the document.  This is where global settings of the        -->
<!-- agent controller are set.  These attributes are as follows             -->
<!--                                                                        -->
<!-- activeConfiguration - this is the configuration name that indicates    -->
<!--                       what child elements will be loaded into the      -->
<!--                       agent controller model.  If the configuration    -->
<!--                       attribute value of the child elements does not   -->
<!--                       match the activeConfiguration value then that    -->
<!--                       element and it'schildren  will be ignored.       -->
<!--                       Also, if the child does not specify the          -->
<!--                       configuration attribute it will be loaded always -->
<!--                                                                        -->
<!-- version  - the version of the configuration file.  This is currently   -->
<!--            ignored.                                                    -->
<!--                                                                        -->
<!-- port - the port that the agent controller will listen on for external  -->
<!--        connections from clients                                        -->
<!-- loggingLevel  - only log entries that are equal or more important then -->
<!--                 this entry will be placed in the log file at execution -->
<!--                 time.                                                  -->
<!-- loggingDetail - indicates the amount of detail in a log message.       -->
<!--                                                                        -->
<!-- loggingDirectory - the directory where the log file will be placed.    -->
<!--                    If this is not specified the log file will be       -->
<!--                    placed in the same directory as the configuration   -->
<!--                    file.                                               -->
<!--                                                                        -->
<!--  jvm   - the JVM that should be used for Java Jobs that must be ran    -->
<!--          by the controller.                                            -->
<!ELEMENT AgentControllerConfiguration (Security?, AgentControllerEnvironment, Application*, Hosts*, Service*, Agent*) >
<!ATTLIST AgentControllerConfiguration
	activeConfiguration  	CDATA #IMPLIED
	version			CDATA #IMPLIED
	port			CDATA #IMPLIED		
	securePort		CDATA #IMPLIED
	loggingLevel		(DEBUG | INFORMATION | WARNING | SEVERE)  "SEVERE"
	loggingDetail		(LOW | HIGH) "LOW"
	loggingDirectory 	CDATA #IMPLIED
	jvm                     CDATA #IMPLIED>



<!-- SECURITY                                                         -->
<!-- Security settings for communications with the clients.                 -->
<!--                                                                        -->
<!-- configuration - this container and it's members will only be loaded if -->
<!--                 this is not specified or if it matches exactly what    -->
<!--                 is specified in the AgentControllerConfiguration       -->
<!--                 element's activeConfiguration attribute.               -->
<!--                                                                        -->
<!--                                                                        -->
<!-- securityProvider - the name of the class that is providing the         -->
<!--                   JSSE implmentation.                                  -->
<!--                                                                        -->
<!-- keyManager - the class that implements the                             -->
<!--              org.eclipse.haydes.execution.security.IKeyManager         -->
<!--              interface.  The key manager will be invoked to load       -->
<!--              the keystore and get the KeyManager and TrustManager      -->
<!--              implementations that will be used to authenticate         -->
<!--              incoming connections.                                     -->
<!--                                                                        -->
<!-- cipherSuites - the cipher suites that should be used when establishing -->
<!--                a connection. (comma separated list) If this is not     -->
<!--                specified then all the supportd cipher suites of the    -->
<!--                specified provider will be used.                        -->
<!--                                                                        -->
<!-- protocols - the allowable protocols that can be used when establishing -->
<!--             a connection.  (comma separated list) If this is not       -->
<!--             specified then "SSL" will be used.                         -->
<!--                                                                        -->
<!-- clientAuthenticate - whether the client needs to fully authenticate    -->
<!--                      with the server during the SSL handshake. If this -->
<!--                      is TRUE then the client must be properly          -->
<!--                      authenticated to a trusted certificate root       -->
<!--                      before a connection will be allowed.              -->
<!--                                                                        -->
<!-- aclEnabled - whether the Acl definition child will be used to control  -->
<!--              access to the agent controller.                           -->
<!--                                                                        -->
<!-- keystore - the file which contains all of the keys and certificates    -->
<!--            that will be used for connection management. This must be   -->
<!--            a JKS format Java keystore                                  -->
<!--                                                                        -->
<!-- keystorePassword - the password to access the keystore file.           -->
<!--                                                                        -->
<!-- serverAlias - the alias within the keystore to use to identify the     -->
<!--               server.  If no alias is specified the first certificate  -->
<!--               instance in the file will be used.                       -->
<!--                                                                        -->


<!ELEMENT Security (UserDefinition*, GroupDefinition*)>
<!ATTLIST Security
	configuration              	CDATA #IMPLIED 
	provider			CDATA #REQUIRED
	keystoreManager                 CDATA #REQUIRED
	cipherSuites                    CDATA #IMPLIED
	protocols                       CDATA #IMPLIED
	clientAuthenticate 		(FALSE | TRUE) "FALSE"
	aclEnabled			(FALSE | TRUE) "TRUE"
	keystore			CDATA #REQUIRED
	keystorePassword		CDATA #REQUIRED
	serverAlias			CDATA #IMPLIED>
	
	


<!-- USER  DEFINITION                                                       -->
<!-- A user that can access the agent controller.                           -->
<!--                                                                        -->
<!ELEMENT UserDefinition EMPTY>
<!ATTLIST UserDefinition
	name       		CDATA #REQUIRED
	authenticationType	(OS | MODULE) "OS"
	authenticationModulePath	CDATA #IMPLIED>
	
<!-- GROUP DEFINITION                                                       -->
<!ELEMENT GroupDefinition (Member*)>
<!ATTLIST GroupDefinition
	name	CDATA #REQUIRED>
	
<!-- MEMBER                                                                 -->
<!--                                                                        -->
<!ELEMENT Member EMPTY>
<!ATTLIST Member
	name       CDATA #REQUIRED>

<!-- GROUP                                                                  -->
<!ELEMENT Group EMPTY>
<!ATTLIST Group
	name	CDATA #REQUIRED>
	
	
<!-- AGENT CONTROLLER ENVIRONMENT                                           -->
<!-- Container for specifying the execution environment of the agent        -->
<!-- controller.                                                            -->
<!--                                                                        -->
<!-- configuration - this container and it's members will only be loaded if -->
<!--                 this is not specified or if it matches exactly what    -->
<!--                 is specified in the AgentControllerConfiguration       -->
<!--                 element's activeConfiguration attribute.               -->
<!--                                                                        -->
<!ELEMENT AgentControllerEnvironment (Variable*)>
<!ATTLIST AgentControllerEnvironment
	configuration	CDATA #IMPLIED>


<!-- APPLICATION                                                            -->
<!-- Alias definition that describes an application that can be launched    -->
<!-- by the agent controller.  Only application entries can be launched     -->
<!-- and they must obey the rules specified by the contained elements.      -->
<!--                                                                        -->
<!-- configuration - this container and it's members will only be loaded if -->
<!--                 this is not specified or if it matches exactly what    -->
<!--                 is specified in the AgentControllerConfiguration       -->
<!--                 element's activeConfiguration attribute.               -->
<!--                                                                        -->
<!-- executable - the alias that clients will identify this application     -->
<!--              with.                                                     -->
<!--                                                                        -->
<!-- path - the absolute path of the real execuatble that will be launched  -->
<!--        by the agent controller when this alias is specified            -->
<!--                                                                        -->
<!-- location - the default location on the filesystem where this will      -->
<!--            be executed at.  This is the application's home directory.  -->
<!--            This can be overriden by the client                         -->
<!--                                                                        -->
<!ELEMENT Application (Variable*, Parameter*)>
<!ATTLIST Application
	configuration	CDATA #IMPLIED
	executable 	CDATA #REQUIRED
	path 		CDATA #REQUIRED
	location	CDATA #REQUIRED>

<!-- VARIABLE                                                               -->
<!-- Defines an environment variable.  This can either be used to specify   -->
<!-- an environment variable for the agent controller or/and an             -->
<!-- application.  Variables that are specified within the                  -->
<!-- AgentControllerEnvironment element are also applied to all             -->
<!-- applications.  These variables ar eprocessed in the order in whcih     -->
<!-- they are specified in the configuration.                               -->
<!--                                                                        -->
<!-- name - the environment variable name.                                  -->
<!--                                                                        -->
<!-- value - the value to apply to the environment variable.                -->
<!--                                                                        -->
<!-- position - where to place this value in terms of the environment       -->
<!--            variables current value.                                    -->
<!--                                                                        -->
<!ELEMENT Variable EMPTY>
<!ATTLIST Variable
	name 		CDATA #REQUIRED
	value	 	CDATA #REQUIRED
	position 	(append | prepend |replace)  "append">


<!-- PARAMETER                                                              -->
<!-- Defines a parameter that will be applied to the application when it is -->
<!-- launched by the agent controller.  These are processed in order as     -->
<!-- Variable's are.                                                        -->
<!--                                                                        -->
<!-- value - the parameter value                                            -->
<!-- position - where to place this value in terms of the current           -->
<!--            parameters                                                  -->
<!--                                                                        -->
<!ELEMENT Parameter EMPTY>
<!ATTLIST Parameter
	value 	CDATA #REQUIRED
	position 	(append | prepend |replace)  "append">
	
	
<!-- HOSTS                                                                  -->
<!-- A cotainer for specifying what hosts are allowed to interact with the  -->
<!-- agent controller.  By default all hosts are denied access to the agent -->
<!-- controller, including the local host. The contained elements are       -->
<!-- processed as a set of rules, in the order they are specified.          -->
<!--                                                                        -->
<!-- configuration - this container and it's members will only be loaded if -->
<!--                 this is not specified or if it matches exactly what    -->
<!--                 is specified in the AgentControllerConfiguration       -->
<!--                 element's activeConfiguration attribute.               -->
<!--                                                                        -->
<!ELEMENT Hosts (Allow*, Deny*)>
<!ATTLIST Hosts
	configuration	CDATA #IMPLIED>


<!-- ALLOW                                                                  -->
<!-- Specifies a host that is allowed access to the local agent controller. -->
<!--                                                                        -->
<!-- host - the hostname of the machine that is allowed access to this      -->
<!--        agent controller.  There are two wildcards supported.           -->
<!--         1.  LOCAL - all interfaces on the local host.                  -->
<!--         2.  ALL   - all interfaces on all hosts.                       -->
<!--                                                                        -->
<!-- net - a network specification for a collection of hosts that are       -->
<!--       allowed access to the local agent controller.  This attribute    -->
<!--       is used in conjunction with the mask attribute.  If the address  -->
<!--       of the client machine bitwise anded with the mask equals the     -->
<!--       net attribute value then the communication is allowed.           -->
<!--       For example.  To allow all machines belonging to the C class     -->
<!--       network 192.168.0.0 to communicate with the local agent          -->
<!--       controller, specify the following:                               -->
<!--                   net="192.168.0.0"   mask="255.255.0.0"               -->
<!--                                                                        -->
<!ELEMENT Allow EMPTY>
<!ATTLIST Allow
	host CDATA #IMPLIED
	net  CDATA #IMPLIED
	mask CDATA #IMPLIED>


<!-- DENY                                                                   -->
<!-- Specifies a host that is denied access to the local agent controller.  -->
<!--                                                                        -->
<!-- host - the hostname of the machine that is denied access to this       -->
<!--        agent controller.  There are two wildcards supported.           -->
<!--         1.  LOCAL - all interfaces on the local host.                  -->
<!--         2.  ALL   - all interfaces on all hosts.                       -->
<!--                                                                        -->
<!-- net - a network specification for a collection of hosts that are       -->
<!--       denied access to the local agent controller.  This attribute     -->
<!--       is used in conjunction with the mask attribute.  If the address  -->
<!--       of the client machine bitwise anded with the mask equals the     -->
<!--       net attribute value then the communication is denied.            -->
<!--       For example.  To deny all machines belonging to the C class      -->
<!--       network 192.168.0.0 to communicate with the local agent          -->
<!--       controller, specify the following:                               -->
<!--                   net="192.168.0.0"   mask="255.255.0.0"               -->
<!--                                                                        -->
<!ELEMENT Deny EMPTY>
<!ATTLIST Deny
	host CDATA #IMPLIED
	net  CDATA #IMPLIED
	mask CDATA #IMPLIED>


<!-- SERVICE                                                                -->
<!-- Specifes a sevice that is to be loaded and managed by the agent        -->
<!-- controller.  Services are loaded at agent controller start time.       -->
<!--                                                                        -->
<!-- configuration - this container and it's members will only be loaded if -->
<!--                 this is not specified or if it matches exactly what    -->
<!--                 is specified in the AgentControllerConfiguration       -->
<!--                 element's activeConfiguration attribute.               -->
<!--                                                                        -->
<!-- name - the alias that clients will identify this service               -->
<!--        with.                                                           -->
<!--                                                                        -->
<!-- path - the absolute path of the real shared object/dll that will be    -->
<!--        loaded by the agent controller.                                 -->
<!--                                                                        -->
<!ELEMENT Service (Option*)>
<!ATTLIST Service
	configuration	CDATA #IMPLIED
	name		CDATA #REQUIRED
	path		CDATA #REQUIRED>


<!-- AGENT                                                                  -->
<!-- Container for a default configuration for an agent.  Agents of the     -->
<!-- specified name/type will be given this configuration information when  -->
<!-- they first register with the agent controller.                         -->
<!--                                                                        -->
<!-- configuration - this container and it's members will only be loaded if -->
<!--                 this is not specified or if it matches exactly what    -->
<!--                 is specified in the AgentControllerConfiguration       -->
<!--                 element's activeConfiguration attribute.               -->
<!--                                                                        -->
<!-- name - the name of the agent as it is when the agent registers with    -->
<!--        the agent controller.                                           -->
<!--                                                                        -->
<!-- type - the type of the agent as it is when the agent registers with    -->
<!--        the agent controller.                                           -->
<!--                                                                        -->
<!-- dataChannelSize - the size of the data channel between the agent       -->
<!--                   controller and the agent.  This channel is used in   -->
<!--                   order to allow the agent to quickly write to the     -->
<!--                   agent controller without blocking until the data     -->
<!--                   is forwarded to the monitor or to the logfile.       -->
<!--                                                                        -->
<!ELEMENT Agent (Option*)>
<!ATTLIST Agent
	configuration	CDATA #IMPLIED	
	name		CDATA #REQUIRED
	type		CDATA #IMPLIED
	dataChannelSize CDATA #IMPLIED
	logFile		CDATA #IMPLIED
	client          (DYNAMIC | HEADLESS ) "DYNAMIC">


<!-- OPTION                                                                 -->
<!-- A configuration entry that applies to either a service or an agent.    -->
<!-- These options will be provided to the agent/service at registration    -->
<!-- time.                                                                  -->
<!--                                                                        -->
<!-- type - the type specifyer that describes this option.                  -->
<!--                                                                        -->
<!-- name - the name of this option.                                        -->
<!--                                                                        -->
<!-- value - the value of this option.                                      -->
<!--                                                                        -->
<!ELEMENT Option EMPTY>
<!ATTLIST Option
	type		CDATA #REQUIRED
	name 		CDATA #REQUIRED
	value 	CDATA #REQUIRED>