org.objectweb.proactive.core.process.glite
Class GLiteProcess

java.lang.Object
  extended byorg.objectweb.proactive.core.process.AbstractUniversalProcess
      extended byorg.objectweb.proactive.core.process.AbstractExternalProcess
          extended byorg.objectweb.proactive.core.process.AbstractExternalProcessDecorator
              extended byorg.objectweb.proactive.core.process.glite.GLiteProcess
All Implemented Interfaces:
ExternalProcess, ExternalProcessDecorator, FileDependant, java.io.Serializable, UniversalProcess

public class GLiteProcess
extends AbstractExternalProcessDecorator
implements FileDependant

GLite Process implementation. This implementation works only for ProActive deployment, and not to submit single commands

Since:
ProActive 3.0
Version:
1.0, 2005/09/20
Author:
ProActive Team
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.objectweb.proactive.core.process.AbstractExternalProcessDecorator
AbstractExternalProcessDecorator.CompositeMessageLogger, AbstractExternalProcessDecorator.CompositeMessageSink
 
Nested classes inherited from class org.objectweb.proactive.core.process.AbstractExternalProcess
AbstractExternalProcess.NullMessageLogger, AbstractExternalProcess.ProcessInputHandler, AbstractExternalProcess.ProcessOutputHandler, AbstractExternalProcess.SimpleMessageSink, AbstractExternalProcess.StandardOutputMessageLogger
 
Field Summary
protected  java.lang.String command_path
           
protected  boolean confFileOption
           
protected  java.lang.String configFile
           
protected static java.lang.String DEFAULT_COMMAND_PATH
           
protected static java.lang.String DEFAULT_CONFIG_FILE
           
protected static java.lang.String DEFAULT_FILE_LOCATION
           
protected static java.lang.String DEFAULT_PROCESSOR_NUMBER
           
protected static java.lang.String DEFAULT_STDOUPUT
           
protected  java.lang.String fileName
           
protected  java.lang.String filePath
           
protected  java.lang.String hostList
           
protected  java.lang.String interactive
           
static GLiteJobAd jad
           
protected  boolean jdlRemote
           
protected  int jobID
           
protected  java.lang.String logBook
           
protected  java.lang.String netServer
           
protected  java.lang.String processor
           
protected  java.lang.String remoteFilePath
           
protected  java.lang.String stdOutput
           
 
Fields inherited from class org.objectweb.proactive.core.process.AbstractExternalProcessDecorator
targetProcess
 
Fields inherited from class org.objectweb.proactive.core.process.AbstractExternalProcess
clogger, closeStream, errorMessageLogger, externalProcess, FILE_TRANSFER_DEFAULT_PROTOCOL, fileTransferLogger, inputMessageLogger, IS_WINDOWS_SYSTEM, NO_COMPOSITION, outputMessageSink
 
Fields inherited from class org.objectweb.proactive.core.process.AbstractUniversalProcess
certificateLocation, command, DEFAULT_HOSTNAME, DEFAULT_USERNAME, environment, hostname, isFinished, isStarted, LOCALHOST, privateKeyLocation, securityFile, username
 
Fields inherited from interface org.objectweb.proactive.core.process.ExternalProcessDecorator
APPEND_TO_COMMAND_COMPOSITION, COPY_FILE_AND_APPEND_COMMAND, GIVE_COMMAND_AS_PARAMETER, SEND_TO_OUTPUT_STREAM_COMPOSITION
 
Fields inherited from interface org.objectweb.proactive.core.process.UniversalProcess
logger, UNKNOWN_NODE_NUMBER
 
Constructor Summary
GLiteProcess()
          Create a new GLiteProcess Used with XML Descriptors
GLiteProcess(ExternalProcess targetProcess)
          Create a new GLiteProcess
 
Method Summary
 void addAtt(java.lang.String attrName, org.glite.wms.jdlj.Ad attrValue)
           
 void addAtt(java.lang.String attrName, boolean attrValue)
           
 void addAtt(java.lang.String attrName, double attrValue)
           
 void addAtt(java.lang.String attrName, int attrValue)
           
 void addAtt(java.lang.String attrName, java.lang.String attrValue)
           
protected  java.lang.String buildGLiteCommand()
          Add java arguments to the jdl file.
 void buildJdlFile()
          Create the jdl file with all the options specified in the descriptor
 java.lang.String getCommand_path()
           
 java.lang.String getConfigFile()
           
 java.lang.String getFileName()
           
 java.lang.String getFilePath()
           
 FileTransfer getFileTransfertDefiniton()
           
 UniversalProcess getFinalProcess()
          Returns the last process of the chain
 GLiteJobAd getJad()
           
 java.lang.String getNetServer()
           
 int getNodeNumber()
          Returns the number of nodes targeted
 java.lang.String getProcessId()
          GETTERS AND SETTERS *
 java.lang.String getProcessorNumber()
          Returns the number of processor requested for the job
 java.lang.String getRemoteFilePath()
           
protected  java.lang.String internalBuildCommand()
           
 boolean isJdlRemote()
           
static void main(java.lang.String[] args)
           
 void setCommand_path(java.lang.String command_path)
           
 void setConfigFile(java.lang.String configFile)
           
 void setConfigFileOption(boolean b)
           
 void setFileName(java.lang.String fileName)
           
 void setFilePath(java.lang.String filePath)
           
 void setJdlRemote(boolean jdlRemote)
           
 void setNetServer(java.lang.String netServer)
           
 void setRemoteFilePath(java.lang.String remoteFilePath)
           
 
Methods inherited from class org.objectweb.proactive.core.process.AbstractExternalProcessDecorator
buildCommand, getCompositionType, getTargetProcess, handleCopyFile, handleOutput, internalStartProcess, setCompositionType, setTargetProcess, toString
 
Methods inherited from class org.objectweb.proactive.core.process.AbstractExternalProcess
buildEnvironmentCommand, buildUnixEnvironmentCommand, buildWindowsEnvironmentCommand, closeStream, getErrorMessageLogger, getFileTransferDefaultCopyProtocol, getFileTransferWorkShopDeploy, getFileTransferWorkShopRetrieve, getInputMessageLogger, getOutputMessageSink, handleError, handleInput, handleProcess, internalFileTransferDefaultProtocol, internalStartFileTransfer, internalStopProcess, internalWaitFor, setErrorMessageLogger, setInputMessageLogger, setOutputMessageSink
 
Methods inherited from class org.objectweb.proactive.core.process.AbstractUniversalProcess
checkStarted, getCommand, getCommandPath, getEnvironment, getHostname, getUsername, isFinished, isHierarchical, isStarted, pushProcessAttributes, setCommandPath, setEnvironment, setHostname, setUsername, startFileTransfer, startProcess, stopProcess, toString, waitFor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.objectweb.proactive.core.process.ExternalProcess
closeStream, getErrorMessageLogger, getFileTransferWorkShopDeploy, getFileTransferWorkShopRetrieve, getInputMessageLogger, getOutputMessageSink, setErrorMessageLogger, setInputMessageLogger, setOutputMessageSink
 
Methods inherited from interface org.objectweb.proactive.core.process.UniversalProcess
getCommand, getCommandPath, getEnvironment, getHostname, getUsername, isFinished, isHierarchical, isStarted, setCommandPath, setEnvironment, setHostname, setUsername, startFileTransfer, startProcess, stopProcess, waitFor
 

Field Detail

DEFAULT_PROCESSOR_NUMBER

protected static final java.lang.String DEFAULT_PROCESSOR_NUMBER
See Also:
Constant Field Values

DEFAULT_COMMAND_PATH

protected static final java.lang.String DEFAULT_COMMAND_PATH
See Also:
Constant Field Values

DEFAULT_FILE_LOCATION

protected static final java.lang.String DEFAULT_FILE_LOCATION

DEFAULT_STDOUPUT

protected static final java.lang.String DEFAULT_STDOUPUT

DEFAULT_CONFIG_FILE

protected static final java.lang.String DEFAULT_CONFIG_FILE

jobID

protected int jobID

hostList

protected java.lang.String hostList

processor

protected java.lang.String processor

command_path

protected java.lang.String command_path

interactive

protected java.lang.String interactive

filePath

protected java.lang.String filePath

stdOutput

protected java.lang.String stdOutput

fileName

protected java.lang.String fileName

configFile

protected java.lang.String configFile

remoteFilePath

protected java.lang.String remoteFilePath

confFileOption

protected boolean confFileOption

jdlRemote

protected boolean jdlRemote

netServer

protected java.lang.String netServer

logBook

protected java.lang.String logBook

jad

public static GLiteJobAd jad
Constructor Detail

GLiteProcess

public GLiteProcess()
Create a new GLiteProcess Used with XML Descriptors


GLiteProcess

public GLiteProcess(ExternalProcess targetProcess)
Create a new GLiteProcess

Parameters:
targetProcess - The target process associated to this process. The target process represents the process that will be launched with the glite-job-submit command
Method Detail

main

public static void main(java.lang.String[] args)

buildJdlFile

public void buildJdlFile()
Create the jdl file with all the options specified in the descriptor


internalBuildCommand

protected java.lang.String internalBuildCommand()
Specified by:
internalBuildCommand in class AbstractExternalProcessDecorator

buildGLiteCommand

protected java.lang.String buildGLiteCommand()
Add java arguments to the jdl file. Set the name of jdl file. Mandatory attributes : Requirements, rank'

Returns:
Empty string. Command line is not necessary there.
Throws:
llegalArgumentException, - Exception

getProcessId

public java.lang.String getProcessId()
GETTERS AND SETTERS *

Specified by:
getProcessId in interface UniversalProcess
Returns:
the id of the process. This id is just the first letters of the process class, to be able to identify the sequence of processes used

getNodeNumber

public int getNodeNumber()
Description copied from interface: UniversalProcess
Returns the number of nodes targeted

Specified by:
getNodeNumber in interface UniversalProcess
Returns:
the number of nodes targeted. Represents the number of nodes expected to use when starting this process. If this number cannot be known, waiting for all available nodes for example, UNKNOWN_NODE_NUMBER is returned.

getProcessorNumber

public java.lang.String getProcessorNumber()
Returns the number of processor requested for the job

Returns:
String

getFinalProcess

public UniversalProcess getFinalProcess()
Description copied from interface: UniversalProcess
Returns the last process of the chain

Specified by:
getFinalProcess in interface UniversalProcess
Returns:
the last process of the chain

getFileName

public java.lang.String getFileName()
Returns:
Returns the fileName.

setFileName

public void setFileName(java.lang.String fileName)
Parameters:
fileName - The fileName to set.

getFilePath

public java.lang.String getFilePath()
Returns:
Returns the filePath.

setFilePath

public void setFilePath(java.lang.String filePath)
Parameters:
filePath - The filePath to set.

getCommand_path

public java.lang.String getCommand_path()
Returns:
Returns the command_path.

setCommand_path

public void setCommand_path(java.lang.String command_path)
Parameters:
command_path - The command_path to set.

getJad

public GLiteJobAd getJad()
Returns:
Returns the jad.

addAtt

public void addAtt(java.lang.String attrName,
                   org.glite.wms.jdlj.Ad attrValue)
            throws java.lang.Exception
Parameters:
attrName - attributes to add to the GliteJobAd object
attrValue - value of the atributes
Throws:
javax.naming.directory.InvalidAttributeValueException
java.lang.IllegalArgumentException
java.lang.Exception

addAtt

public void addAtt(java.lang.String attrName,
                   int attrValue)
            throws java.lang.Exception
Parameters:
attrName - attributes to add to the GliteJobAd object
attrValue - value of the added attrName
Throws:
javax.naming.directory.InvalidAttributeValueException
java.lang.IllegalArgumentException
java.lang.Exception

addAtt

public void addAtt(java.lang.String attrName,
                   double attrValue)
            throws java.lang.Exception
Parameters:
attrName - attributes to add to the GliteJobAd object
attrValue - value of the added attrName
Throws:
javax.naming.directory.InvalidAttributeValueException
java.lang.IllegalArgumentException
java.lang.Exception

addAtt

public void addAtt(java.lang.String attrName,
                   java.lang.String attrValue)
            throws java.lang.Exception
Parameters:
attrName - attributes to add to the GliteJobAd object
attrValue - value of the added attrName
Throws:
javax.naming.directory.InvalidAttributeValueException
java.lang.IllegalArgumentException
java.lang.Exception

addAtt

public void addAtt(java.lang.String attrName,
                   boolean attrValue)
            throws java.lang.Exception
Parameters:
attrName - attributes to add to the GliteJobAd object
attrValue - value of the added attrName
Throws:
javax.naming.directory.InvalidAttributeValueException
java.lang.IllegalArgumentException
java.lang.Exception

getNetServer

public java.lang.String getNetServer()
Returns:
Returns the netServer.

setNetServer

public void setNetServer(java.lang.String netServer)
Parameters:
netServer - The netServer to set.

getConfigFile

public java.lang.String getConfigFile()
Returns:
Returns the configFile.

setConfigFile

public void setConfigFile(java.lang.String configFile)
Parameters:
configFile - The configFile to set.

setConfigFileOption

public void setConfigFileOption(boolean b)

isJdlRemote

public boolean isJdlRemote()
Returns:
Returns the jdlRemote.

setJdlRemote

public void setJdlRemote(boolean jdlRemote)
Parameters:
jdlRemote - The jdlRemote to set.

getRemoteFilePath

public java.lang.String getRemoteFilePath()
Returns:
Returns the remoteFilePath.

setRemoteFilePath

public void setRemoteFilePath(java.lang.String remoteFilePath)
Parameters:
remoteFilePath - The remoteFilePath to set.

getFileTransfertDefiniton

public FileTransfer getFileTransfertDefiniton()
Specified by:
getFileTransfertDefiniton in interface FileDependant


Copyright 2001-2005 INRIA All Rights Reserved.