org.globus.cog.abstraction.interfaces
Interface JobSpecification

All Superinterfaces:
Specification
All Known Implementing Classes:
JobSpecificationImpl

public interface JobSpecification
extends Specification

The JobSpecification represents all the parameters required for the remote job execution Task.


Field Summary
 
Fields inherited from interface org.globus.cog.abstraction.interfaces.Specification
FILE_OPERATION, FILE_TRANSFER, JOB_SUBMISSION
 
Method Summary
 void addArgument(int index, String argument)
          Adds a commandline argument for the remote exectable at the given index.
 void addArgument(String argument)
          Adds a commandline argument for the remote exectable.
 void addEnvironmentVariable(String name, String value)
          Adds an environment variable to the remote execution environment.
 Enumeration getAllAttributes()
           
 String getArguments()
          Returns the set of space-separated arguments supplied for the remote executable.
 String getArgumentsAsString()
          Returns the set of space-separated arguments supplied for the remote executable.
 Vector getArgumentsAsVector()
          Retruns a Vector representing the set of commandline arguments for the executable.
 Object getAttribute(String name)
           
 String getDirectory()
          Returns the absolute path name of the remote working directory.
 Collection getEnvironment()
          Returns a collection representing all the environment variable names associated with the remote execution environment.
 String getEnvironmentVariable(String name)
          Returns the environment variable with the given name.
 String getExecutable()
          Returns the absolute location of the executable
 String getStdError()
          Returns the file used for redirecting the error produced on the stderr of the remote machine.
 String getStdInput()
          Returns the file used as stdin on the remote machine.
 String getStdOutput()
          Returns the file used for redirecting the output produced on the stdout of the remote machine.
 boolean isBatchJob()
          Chacks if the Task is to be executed as a batch job.
 boolean isLocalExecutable()
          Checks if the executable is staged-in from the local machine.
 boolean isLocalInput()
          Checks if the stdin is staged-in from the local machine.
 boolean isRedirected()
          Checks if the stdout and stderror is redirected to the local machine.
 String removeArgument(int index)
          Removes the argument at the given index from the argument list
 void removeArgument(String argument)
          Removes the given argument from the argument list
 String removeEnvironmentVariable(String name)
          Removes the environment variable with the given name from the remote execution environment.
 void setArguments(String arguments)
          Sets the comandline arguments for the remote executable.
 void setArguments(Vector arguments)
          Sets the comandline arguments for the remote executable.
 void setAttribute(String name, Object value)
           
 void setBatchJob(boolean bool)
          Specifies that the Task is to be executed as a batch job.
 void setDirectory(String directory)
          Sets the working directory on the remote machine.
 void setExecutable(String executable)
          Sets the name of the executable to be run remotely.
 void setLocalExecutable(boolean bool)
          Specifies that the executable must be staged-in from the local machine.
 void setLocalInput(boolean bool)
          Specifies that the stdin must be staged-in from the local machine.
 void setRedirected(boolean bool)
          Specifies if the stdout and stderr have to be redirected.
 void setStdError(String error)
          Sets the file for redirecting the error produced on the stderr of the remote machine.
 void setStdInput(String input)
          Sets the file from which to redirect the data as stdin on the remote machine.
 void setStdOutput(String output)
          Sets the file for redirecting the output produced on the stdout of the remote machine.
 
Methods inherited from interface org.globus.cog.abstraction.interfaces.Specification
getSpecification, getType, setSpecification, setType
 

Method Detail

setExecutable

public void setExecutable(String executable)
Sets the name of the executable to be run remotely.

Parameters:
executable - a string representing the absolute location of the executable.

getExecutable

public String getExecutable()
Returns the absolute location of the executable


setDirectory

public void setDirectory(String directory)
Sets the working directory on the remote machine.

Parameters:
directory - a string representing the absolute path name of the remote working directory.

getDirectory

public String getDirectory()
Returns the absolute path name of the remote working directory.


setArguments

public void setArguments(String arguments)
Sets the comandline arguments for the remote executable. A set of space seperated arguments can be supplied: "arg1 arg2 agr3 ..."

Parameters:
arguments - a string representing the set of arguments for the remote executable.

setArguments

public void setArguments(Vector arguments)
Sets the comandline arguments for the remote executable.

Parameters:
arguments - a Vector representing the set of arguments for the remote executable.

getArguments

public String getArguments()
Returns the set of space-separated arguments supplied for the remote executable.


getArgumentsAsString

public String getArgumentsAsString()
Returns the set of space-separated arguments supplied for the remote executable.


addArgument

public void addArgument(String argument)
Adds a commandline argument for the remote exectable. Multiple commandline arguments can be set by making multiple calls to this function.

Parameters:
argument - a string representing an argument for the remote executable.

addArgument

public void addArgument(int index,
                        String argument)
Adds a commandline argument for the remote exectable at the given index. Multiple commandline arguments can be set by making multiple calls to this function.

Parameters:
index - the index in the argument list
argument - a string representing an argument for the remote executable.

removeArgument

public void removeArgument(String argument)
Removes the given argument from the argument list

Parameters:
argument - the String argument to be removed

removeArgument

public String removeArgument(int index)
Removes the argument at the given index from the argument list

Parameters:
index - the index of the argument to be removed

getArgumentsAsVector

public Vector getArgumentsAsVector()
Retruns a Vector representing the set of commandline arguments for the executable.


addEnvironmentVariable

public void addEnvironmentVariable(String name,
                                   String value)
Adds an environment variable to the remote execution environment. Multiple environment variables can be created by making multiple calls to this method.

Parameters:
name - the name of the environment variable
value - the value of the environment variable

removeEnvironmentVariable

public String removeEnvironmentVariable(String name)
Removes the environment variable with the given name from the remote execution environment.

Parameters:
name - the name of the environment variable
Returns:
the value of the environment variable

getEnvironmentVariable

public String getEnvironmentVariable(String name)
Returns the environment variable with the given name.

Parameters:
name - the name of the environment variable
Returns:
the value of the environment variable

getEnvironment

public Collection getEnvironment()
Returns a collection representing all the environment variable names associated with the remote execution environment.


setStdOutput

public void setStdOutput(String output)
Sets the file for redirecting the output produced on the stdout of the remote machine.

Parameters:
output - a string representing the file for redirecting the remote stdout.

getStdOutput

public String getStdOutput()
Returns the file used for redirecting the output produced on the stdout of the remote machine.


setStdInput

public void setStdInput(String input)
Sets the file from which to redirect the data as stdin on the remote machine.


getStdInput

public String getStdInput()
Returns the file used as stdin on the remote machine.


setStdError

public void setStdError(String error)
Sets the file for redirecting the error produced on the stderr of the remote machine.

Parameters:
error - a string representing the file for redirecting the remote error.

getStdError

public String getStdError()
Returns the file used for redirecting the error produced on the stderr of the remote machine.


setBatchJob

public void setBatchJob(boolean bool)
Specifies that the Task is to be executed as a batch job. If it is a batch job, then the client machine will not be notified regarding the stautus of the remote execution. From the client's perspective, the Task is completed as soon as it is submitted remotely. The execution status and the output/error must be retrieved by the user in an offline fashion.

Parameters:
bool - a boolean value indicating if the Task is a batch job.

isBatchJob

public boolean isBatchJob()
Chacks if the Task is to be executed as a batch job.


setRedirected

public void setRedirected(boolean bool)
Specifies if the stdout and stderr have to be redirected.

If filename for the setStdOutput in this Specification is null and the setRedirected is true, then the remote stdout is redirected to the local machine and can be retrieved from the getOutput method of the container Task.


isRedirected

public boolean isRedirected()
Checks if the stdout and stderror is redirected to the local machine.


setLocalInput

public void setLocalInput(boolean bool)
Specifies that the stdin must be staged-in from the local machine.


isLocalInput

public boolean isLocalInput()
Checks if the stdin is staged-in from the local machine.


setLocalExecutable

public void setLocalExecutable(boolean bool)
Specifies that the executable must be staged-in from the local machine.


isLocalExecutable

public boolean isLocalExecutable()
Checks if the executable is staged-in from the local machine.


setAttribute

public void setAttribute(String name,
                         Object value)

getAttribute

public Object getAttribute(String name)

getAllAttributes

public Enumeration getAllAttributes()