uk.ac.ncl.cs.instantsoap.strategydp
Interface StrategyDispatcher

All Known Implementing Classes:
MapStrategyDispatcher, MultiplexingStrategyDispatcher, QueuedDispatcher

@Spi
public interface StrategyDispatcher

Responsible for routing jobManager specifications to the handler that will process them.

All of the methods defined in this interface must be thread-safe. That is, they must work regardless of how many invocations they recieve in parallel.

Version:
1.0
Author:
Phillip Lord, Matthew Pocock

Nested Class Summary
static interface StrategyDispatcher.ValidatedJob
          A validated jobManager.
 
Method Summary
 MetaData describeApplication(String application)
           
 Set<MetaData> getInputs(String application)
           
 Set<MetaData> getOutputs(String application)
           
 boolean handlesApplication(String application)
           
 List<String> listApplications()
           
 StrategyDispatcher.ValidatedJob validateJob(JobSpecification specification)
          Ensure that the jobManager specification can be dispatched.
 

Method Detail

handlesApplication

boolean handlesApplication(String application)

listApplications

List<String> listApplications()

describeApplication

MetaData describeApplication(String application)
                             throws UnknownApplicationException
Throws:
UnknownApplicationException

getInputs

Set<MetaData> getInputs(String application)
                        throws UnknownApplicationException
Throws:
UnknownApplicationException

getOutputs

Set<MetaData> getOutputs(String application)
                         throws UnknownApplicationException
Throws:
UnknownApplicationException

validateJob

StrategyDispatcher.ValidatedJob validateJob(JobSpecification specification)
                                            throws InvalidJobSpecificationException,
                                                   UnknownApplicationException
Ensure that the jobManager specification can be dispatched.

If there is no handler for this jobManager, or if it is malformed, then an InvalidJobSpecificationException should be raised. Otherwise, this should chain on to the right handler's validateJob() method. Once validated, this returns a ValidatedJob that can be used to run the jobManager specification any number of times.

Parameters:
specification - the JobSpecification describing what to validate
Returns:
the validated job, ready to run
Throws:
InvalidJobSpecificationException - if the JobSpecification is not for something we can run, or if it is mal-formed in some way
UnknownApplicationException - if the application named by the specification is not known


Copyright © 2006-2008. All Rights Reserved.