org.gridbus.broker.farming.alchemi
Class AlchemiJob

java.lang.Object
  extended byorg.gridbus.broker.farming.alchemi.AlchemiJob

public class AlchemiJob
extends java.lang.Object

This class represents a job running on Alchemi middleware

Author:
Rajiv Ranjan (rranjan@cs.mu.oz.au)

Field Summary
 CrossPlatformManagerSoap cms
           
static int flagout
           
static java.util.Hashtable Task_Output
           
 
Constructor Summary
AlchemiJob()
          Default Constructor
AlchemiJob(java.lang.String ManagerAddress)
          The constructor with default manager address
 
Method Summary
 void addListener(AlchemiJobListener listener)
          Adds a job listener
 java.lang.String AlchemiCreateTask()
          Creates a task for this job
 void AlchemijobSubmit(java.lang.String Taskid, java.lang.String jobxml, Job jbw)
          Submits the job to the Alchemi manager
 java.lang.String getfilename(java.lang.String abspath)
          Gets the file name part from the full absolute path
 void GetfinishedAlchemijobs(java.lang.String Task_id)
          Gets the finished jobs from the Alchemi manager node
 int getstatus(java.lang.String Taskid)
          Returns the status of this job
 void removeListener(AlchemiJobListener listener)
          Removes a job listener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cms

public CrossPlatformManagerSoap cms

Task_Output

public static java.util.Hashtable Task_Output

flagout

public static int flagout
Constructor Detail

AlchemiJob

public AlchemiJob()
Default Constructor


AlchemiJob

public AlchemiJob(java.lang.String ManagerAddress)
The constructor with default manager address

Parameters:
ManagerAddress - - the IP / hostname of the manager
Method Detail

addListener

public void addListener(AlchemiJobListener listener)
Adds a job listener

Parameters:
listener - - the listener to add

getstatus

public int getstatus(java.lang.String Taskid)
              throws java.rmi.RemoteException
Returns the status of this job

Parameters:
Taskid - - taskID of this job
Returns:
- the job status
Throws:
java.rmi.RemoteException

removeListener

public void removeListener(AlchemiJobListener listener)
Removes a job listener

Parameters:
listener - - the listener to remove

AlchemiCreateTask

public java.lang.String AlchemiCreateTask()
Creates a task for this job

Returns:
- the task id for the newly created job

getfilename

public java.lang.String getfilename(java.lang.String abspath)
Gets the file name part from the full absolute path

Parameters:
abspath - - the absolute path of the file
Returns:
- the filename part of the path

AlchemijobSubmit

public void AlchemijobSubmit(java.lang.String Taskid,
                             java.lang.String jobxml,
                             Job jbw)
                      throws java.io.FileNotFoundException,
                             org.jaxen.JaxenException,
                             java.io.IOException
Submits the job to the Alchemi manager

Parameters:
Taskid - - task id of this job
jobxml - - xml that represents the job
jbw - - the job wrapper object
Throws:
java.io.FileNotFoundException
org.jaxen.JaxenException
java.io.IOException

GetfinishedAlchemijobs

public void GetfinishedAlchemijobs(java.lang.String Task_id)
                            throws java.io.FileNotFoundException,
                                   java.io.IOException,
                                   org.jaxen.JaxenException
Gets the finished jobs from the Alchemi manager node

Parameters:
Task_id -
Throws:
java.io.FileNotFoundException
java.io.IOException
org.jaxen.JaxenException