uk.ac.rdg.resc.jstyx.gridservice.config
Class SGSConfig

java.lang.Object
  extended by uk.ac.rdg.resc.jstyx.gridservice.config.SGSConfig

public class SGSConfig
extends java.lang.Object

Class containing configuration info for a single Styx Grid Service

Author:
Jon Blower $Revision: 569 $ $Date: 2006-01-05 16:06:35 +0000 (Thu, 05 Jan 2006) $ $Log$ Revision 1.7 2006/01/05 16:06:35 jonblower SGS clients now deal with possibility that client could be created on a different server Revision 1.6 2006/01/05 12:09:15 jonblower Restructured configuration to give default values for server settings Revision 1.5 2005/12/01 08:29:47 jonblower Refactored XML config handling to simplify clients Revision 1.4 2005/11/10 19:50:43 jonblower Added code to handle output files Revision 1.3 2005/11/10 08:57:21 jonblower Added code to handle output files and streams Revision 1.2 2005/11/09 17:45:00 jonblower Changes to storing of XML config information Revision 1.1 2005/11/07 20:59:34 jonblower Refactored SGS config classes to new package Revision 1.20 2005/11/04 19:28:20 jonblower Changed structure of input files in config file and Styx namespace Revision 1.19 2005/11/03 07:42:47 jonblower Implemented JSAP-based parameter parsing Revision 1.14 2005/10/18 14:08:14 jonblower Removed inputfiles from namespace Revision 1.12 2005/08/02 08:05:18 jonblower Continuing to implement steering Revision 1.10 2005/08/01 16:38:05 jonblower Implemented simple parameter handling Revision 1.9 2005/06/14 07:45:16 jonblower Implemented setting of params and async notification of parameter changes Revision 1.8 2005/05/19 18:42:07 jonblower Implementing specification of input files required by SGS Revision 1.7 2005/05/16 11:00:53 jonblower Changed SGS config XML file structure: separated input and output streams and changed some tag names Revision 1.6 2005/05/13 16:49:34 jonblower Coded dynamic detection and display of service data, also included streams in config file Revision 1.5 2005/05/11 15:14:30 jonblower Implemented more flexible definition of service data elements Revision 1.4 2005/05/11 13:45:19 jonblower Converted SGS config code to use dom4j and Jaxen for XML parsing Revision 1.3 2005/04/27 16:11:35 jonblower Added capability to add documentation files to SGS namespace Revision 1.2 2005/03/26 14:27:53 jonblower Modified to use SGSConfigException Revision 1.1 2005/03/24 17:34:58 jonblower Initial import

Constructor Summary
SGSConfig(org.dom4j.Node gridService, SGSServerConfig serverConfig)
          This is called by the SGS server program to generate a configuration object from the XML config file.
SGSConfig(java.lang.String configXML)
          This constructor is called by client programs to create an SGSConfig object from an XML snippet that has been read over the Styx interface.
 
Method Summary
 java.lang.String getCommand()
           
 java.lang.String getConfigXMLForClient()
           
 java.lang.String getDescription()
           
 java.util.Vector getDocFiles()
           
 java.util.Vector getInputs()
           
 java.lang.String getName()
           
 java.util.Vector getOutputs()
           
 com.martiansoftware.jsap.JSAP getParamParser()
           
 java.util.Vector getParams()
           
 SGSServerConfig getServerConfig()
           
 java.util.Vector getServiceData()
           
 java.util.Vector getSteerables()
           
 java.lang.String getWorkingDirectory()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SGSConfig

public SGSConfig(org.dom4j.Node gridService,
                 SGSServerConfig serverConfig)
          throws SGSConfigException
This is called by the SGS server program to generate a configuration object from the XML config file.

Parameters:
gridService - The Node in the XML config file that is at the root of this Styx Grid Service
serverConfig - Configuration of the server
Throws:
java.lang.IllegalArgumentException - if the name of the SGS contains a space.
SGSConfigException

SGSConfig

public SGSConfig(java.lang.String configXML)
          throws SGSConfigException
This constructor is called by client programs to create an SGSConfig object from an XML snippet that has been read over the Styx interface. This does not populate any of the server-specific fields of this class (e.g. the working directory). After calling this constructor, clients will have access to all the fields that relate to instances of this SGS.

Parameters:
configXML - XML snippet representing the Styx Grid Service
Throws:
SGSConfigException
Method Detail

getServerConfig

public SGSServerConfig getServerConfig()
Returns:
the configuration (port, SSL details etc) of the server

getName

public java.lang.String getName()
Returns:
the name of the service

getCommand

public java.lang.String getCommand()
Returns:
the command string that is run when the SGS is started. This is the string that is passed to Runtime.exec(). This is only meaningful for server-side code (if a client calls this method it will return null).

getDescription

public java.lang.String getDescription()
Returns:
a String that briefly describes this SGS.

getWorkingDirectory

public java.lang.String getWorkingDirectory()
Returns:
the working directory of this SGS. Each instance of the SGS will use a subdirectory of this directory as its working directory. This is only meaningful for server-side code (if a client calls this method it will return null).

getConfigXMLForClient

public java.lang.String getConfigXMLForClient()
Returns:
the XML that was used to create this config object in a form suitable for clients to read. This is the same as the XML that was used to create the config object except that the command attribute of the root element and the documentation section are missing.

getInputs

public java.util.Vector getInputs()
Returns:
Vector of SGSInput objects containing details of all the input files and streams expected by the service

getOutputs

public java.util.Vector getOutputs()
Returns:
Vector of SGSOutput objects containing details of all the output files and streams exposed by the service

getParamParser

public com.martiansoftware.jsap.JSAP getParamParser()
Returns:
JSAP object that is used to parse the command-line parameters

getParams

public java.util.Vector getParams()
Returns:
Vector containing details of all the parameters (as SGSParam objects)

getSteerables

public java.util.Vector getSteerables()
Returns:
Vector of Steerable objects containing details of the parameters that can be adjusted as the executable is running

getDocFiles

public java.util.Vector getDocFiles()
Returns:
Vector of documentation file objects

getServiceData

public java.util.Vector getServiceData()
Returns:
Vector of service data objects


Copyright © 2004-2006 Reading e-Science Centre. All Rights Reserved.