MiG.oneclick
Class Job

java.lang.Object
  extended by MiG.oneclick.Job
All Implemented Interfaces:
java.io.Serializable

public abstract class Job
extends java.lang.Object
implements java.io.Serializable

This class provides the framework needed to create a MiGOneClick job.

See Also:
Serialized Form

Constructor Summary
protected Job()
           
 
Method Summary
protected  boolean checkpoint()
          Used for creating a new checkpoint
protected  void err(java.lang.String str)
          Used for writing to the MiG job stderr.
 int getCheckpointID()
          Used to get the checkpoint counter.
protected  java.lang.String getIOsessionid()
          Used for retrieving the MiG iosessionid
protected  java.lang.String getJobid()
          Used for retrieving the id of the job
 java.lang.StringBuffer getStderr()
          Used to get the MiG job stderr.
 java.lang.StringBuffer getStdout()
          Used to get the MiG job stdout.
abstract  void MiG_main(java.lang.String[] argv)
          The main method of the MiGOneClick job.
protected  File open_file(java.lang.String filename, int mode)
          Used for retrieving a File object, containing information required to perform file I/O.
protected  void out(java.lang.String str)
          Used for writing to the MiG job stdout.
 boolean restoreCheckpointedFiles()
          Used for restoring files from checkpoint
 void setInfo(java.lang.String server, java.lang.String iosessionid, java.lang.String jobid)
          Used for setting the information about the job, this is set by the executing framework, and should not be altered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Job

protected Job()
Method Detail

MiG_main

public abstract void MiG_main(java.lang.String[] argv)
The main method of the MiGOneClick job.

Parameters:
argv - Array of arguments given to the MiGOneClick job.

checkpoint

protected boolean checkpoint()
Used for creating a new checkpoint


restoreCheckpointedFiles

public boolean restoreCheckpointedFiles()
Used for restoring files from checkpoint


getCheckpointID

public int getCheckpointID()
Used to get the checkpoint counter. * @return The checkpoint counter as int.


err

protected void err(java.lang.String str)
Used for writing to the MiG job stderr.

Parameters:
str - String containing the stderr message.

out

protected void out(java.lang.String str)
Used for writing to the MiG job stdout.

Parameters:
str - String containing the stdout message.

open_file

protected File open_file(java.lang.String filename,
                         int mode)
                  throws FileException
Used for retrieving a File object, containing information required to perform file I/O.

Returns:
File containing the MiG server URL and job iosessionid needed to perform the file I/O.
Throws:
FileException

setInfo

public void setInfo(java.lang.String server,
                    java.lang.String iosessionid,
                    java.lang.String jobid)
Used for setting the information about the job, this is set by the executing framework, and should not be altered.

Parameters:
server - String containing the MiG server URL.
iosessionid - String containing the MiG iosessionid of the job.

getJobid

protected java.lang.String getJobid()
Used for retrieving the id of the job

Returns:
String containing MiG jobid

getIOsessionid

protected java.lang.String getIOsessionid()
Used for retrieving the MiG iosessionid

Returns:
String containing MiG iosessionid

getStderr

public java.lang.StringBuffer getStderr()
Used to get the MiG job stderr.

Returns:
StringBuffer containing the MiG job stderr.

getStdout

public java.lang.StringBuffer getStdout()
Used to get the MiG job stdout.

Returns:
StringBuffer containing the MiG job stdout.