uk.ac.ncl.cs.instantsoap.strategydp.impl
Class QueuedDispatcher
java.lang.Object
uk.ac.ncl.cs.instantsoap.strategydp.impl.QueuedDispatcher
- All Implemented Interfaces:
- StrategyDispatcher
public class QueuedDispatcher
- extends Object
- implements StrategyDispatcher
Asynchronously dispatches jobs to an underlying dispatcher, using an
ExecutorService to manage the running of the tasks.
- Author:
- Matthew Pocock
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QueuedDispatcher
public QueuedDispatcher(StrategyDispatcher delegate,
LoggingQueue<UUID> queue)
handlesApplication
public boolean handlesApplication(String application)
- Specified by:
handlesApplication in interface StrategyDispatcher
listApplications
public List<String> listApplications()
- Specified by:
listApplications in interface StrategyDispatcher
describeApplication
public MetaData describeApplication(String application)
throws UnknownApplicationException
- Specified by:
describeApplication in interface StrategyDispatcher
- Throws:
UnknownApplicationException
getInputs
public Set<MetaData> getInputs(String application)
throws UnknownApplicationException
- Specified by:
getInputs in interface StrategyDispatcher
- Throws:
UnknownApplicationException
getOutputs
public Set<MetaData> getOutputs(String application)
throws UnknownApplicationException
- Specified by:
getOutputs in interface StrategyDispatcher
- Throws:
UnknownApplicationException
validateJob
public StrategyDispatcher.ValidatedJob validateJob(JobSpecification specification)
throws InvalidJobSpecificationException,
UnknownApplicationException
- Description copied from interface:
StrategyDispatcher
- 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.
- Specified by:
validateJob in interface StrategyDispatcher
- 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.