org.icenigrid.gridsam.core.plugin
Interface JobManagerContext

All Known Subinterfaces:
JobContext
All Known Implementing Classes:
DefaultJobContext, DefaultJobManagerContext

public interface JobManagerContext

Context interface for DRMConnector to take advantage of services provided by the JobManager


Method Summary
 DRMConnector getDRMConnector(java.lang.String pName)
          get the named DRMConnector from the context
 JobInstanceStore getJobInstanceStore()
          get the job instance store
 void schedule(JobInstance pJobInstance, DRMConnector pConnector)
          schedule the given DRMConnector for immediate execution in this job context for the given job
 void schedule(JobInstance pJobInstance, DRMConnector pConnector, long pRepeatInterval)
          schedule the given DRMConnector for repeated execution in this job context for the given job
 void schedule(JobInstance pJobInstance, DRMConnector pConnector, java.lang.String pCronExpression)
          schedule the given DRMConnector for repeated execution in this job context for the given job
 void schedule(JobInstance pJobInstance, java.lang.String pConnectorName)
          schedule the given named DRMConnector for immediate execution in this job context for the given job
 void schedule(JobInstance pJobInstance, java.lang.String pConnectorName, long pRepeatInterval)
          schedule the given named DRMConnector for immediate execution in this job context for the given job
 void schedule(JobInstance pJobInstance, java.lang.String pConnectorName, java.lang.String pCronExpression)
          schedule the given named DRMConnector for immediate execution in this job context for the given job
 void scheduleImmediately()
          get the DRMConnector that has been added by the schedule operations to be scheduled immediately.
 void unschedule()
          unschedule the currently executing DRMConnector task this context is associated with.
 

Method Detail

getDRMConnector

DRMConnector getDRMConnector(java.lang.String pName)
get the named DRMConnector from the context

Parameters:
pName - the name of the DRMConnector to retrieve
Returns:
DRMConnector the DRMConnector associated with the name, or null if the it is not found

getJobInstanceStore

JobInstanceStore getJobInstanceStore()
get the job instance store

Returns:
String the schedule identifier, which can be used to unschedule the execution

schedule

void schedule(JobInstance pJobInstance,
              DRMConnector pConnector)
              throws JobManagerException
schedule the given DRMConnector for immediate execution in this job context for the given job

Parameters:
pJobInstance - the job instance to run through the DRMConnector
pConnector - the DRMConnector
Throws:
JobManagerException - if the DRMConnector cannot be scheduled

schedule

void schedule(JobInstance pJobInstance,
              java.lang.String pConnectorName)
              throws JobManagerException
schedule the given named DRMConnector for immediate execution in this job context for the given job

Parameters:
pJobInstance - the job instance to run through the DRMConnector
pConnectorName - the name of the DRMConnector resolvable by the context
Throws:
JobManagerException - if the DRMConnector cannot be scheduled

schedule

void schedule(JobInstance pJobInstance,
              DRMConnector pConnector,
              long pRepeatInterval)
              throws JobManagerException
schedule the given DRMConnector for repeated execution in this job context for the given job

Parameters:
pJobInstance - the job instance to run through the DRMConnector
pConnector - the DRMConnector
pRepeatInterval - the period between repeated execution
Throws:
JobManagerException - if the DRMConnector cannot be scheduled

schedule

void schedule(JobInstance pJobInstance,
              java.lang.String pConnectorName,
              long pRepeatInterval)
              throws JobManagerException
schedule the given named DRMConnector for immediate execution in this job context for the given job

Parameters:
pJobInstance - the job instance to run through the DRMConnector
pConnectorName - the name of the DRMConnector resolvable by the context
pRepeatInterval - the period between repeated execution
Throws:
JobManagerException - if the DRMConnector cannot be scheduled

schedule

void schedule(JobInstance pJobInstance,
              DRMConnector pConnector,
              java.lang.String pCronExpression)
              throws java.text.ParseException,
                     JobManagerException
schedule the given DRMConnector for repeated execution in this job context for the given job

Parameters:
pJobInstance - the job instance to run through the DRMConnector
pConnector - the DRMConnector
pCronExpression - the CRON job expression to specify the schedule
Throws:
java.text.ParseException - if the cron expression is invalid
JobManagerException - if the DRMConnector cannot be scheduled

schedule

void schedule(JobInstance pJobInstance,
              java.lang.String pConnectorName,
              java.lang.String pCronExpression)
              throws java.text.ParseException,
                     JobManagerException
schedule the given named DRMConnector for immediate execution in this job context for the given job

Parameters:
pJobInstance - the job instance to run through the DRMConnector
pConnectorName - the name of the DRMConnector resolvable by the context
pCronExpression - the CRON job expression to specify the schedule
Throws:
java.text.ParseException - if the cron expression is invalid
JobManagerException - if the DRMConnector cannot be scheduled

scheduleImmediately

void scheduleImmediately()
                         throws JobManagerException
get the DRMConnector that has been added by the schedule operations to be scheduled immediately. Otherwise they will be scheduled by the managing system at a convenient time.

Throws:
JobManagerException

unschedule

void unschedule()
unschedule the currently executing DRMConnector task this context is associated with. No further execution of this recurrent DRMConnector will be executed.



Copyright © 2008. All Rights Reserved.