gov.bnl.star.offline.scheduler
Class GenericCompositeDispatcher

java.lang.Object
  extended by gov.bnl.star.offline.scheduler.GenericCompositeDispatcher
All Implemented Interfaces:
Dispatcher

public class GenericCompositeDispatcher
extends java.lang.Object
implements Dispatcher

This class submits all jobs to lower level dispatchers using the dispatcher object the particular job points to.

Author:
Levente Hajdu

Constructor Summary
GenericCompositeDispatcher()
           
 
Method Summary
 void dispatch(Request request, java.util.List jobs)
          Routs the jobs to the correct dispatcher
 void Kill(Request request, java.util.List jobs)
          Kills the processes associated with this job.
 void retrieveOutput(Request job, java.util.List jobs)
          Retrieves the output of the job from the target machine.
 void setBackUpDispatcher(Dispatcher dispatcher)
          This method sets the dispatcher to be used if the jobs AssociatedDispatcher is Null.
 java.lang.String Status(Job job, int Processe)
          Returns The status of the job
 void stop()
          Cases the dispacher to stop dispaching and trys to kill dispached jobs This is currently not implemented by any dispatchers.
 boolean test(Queue queue)
          Runs test(s) on underlying components to determine if submitting jobs should be attempted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericCompositeDispatcher

public GenericCompositeDispatcher()
Method Detail

setBackUpDispatcher

public void setBackUpDispatcher(Dispatcher dispatcher)
This method sets the dispatcher to be used if the jobs AssociatedDispatcher is Null. Setting this method is optional.


dispatch

public void dispatch(Request request,
                     java.util.List jobs)
Routs the jobs to the correct dispatcher

Specified by:
dispatch in interface Dispatcher
Parameters:
request - job description and requirements, include input and output file and environment variables

retrieveOutput

public void retrieveOutput(Request job,
                           java.util.List jobs)
Description copied from interface: Dispatcher
Retrieves the output of the job from the target machine. It will first check whether the job has terminated, and than it will retrieve the output files and delete any temporary files on the target machine.

Specified by:
retrieveOutput in interface Dispatcher
Parameters:
job - job description and requirements, include input and output file and environment variables

Kill

public void Kill(Request request,
                 java.util.List jobs)
Description copied from interface: Dispatcher
Kills the processes associated with this job.

Specified by:
Kill in interface Dispatcher

Status

public java.lang.String Status(Job job,
                               int Processe)
Description copied from interface: Dispatcher
Returns The status of the job

Specified by:
Status in interface Dispatcher

stop

public void stop()
Description copied from interface: Dispatcher
Cases the dispacher to stop dispaching and trys to kill dispached jobs This is currently not implemented by any dispatchers.

Specified by:
stop in interface Dispatcher

test

public boolean test(Queue queue)
Description copied from interface: Dispatcher
Runs test(s) on underlying components to determine if submitting jobs should be attempted. Will return true to indicate everything is alright and false if the test has failed.

Specified by:
test in interface Dispatcher


Copyright © 2002-2004 STAR collaboration - Brookhaven National Laboratory. All Rights Reserved.