uk.ac.ncl.cs.instantsoap.strategydp.impl
Class MultiplexingStrategyDispatcher
java.lang.Object
uk.ac.ncl.cs.instantsoap.strategydp.impl.MultiplexingStrategyDispatcher
- All Implemented Interfaces:
- StrategyDispatcher
public class MultiplexingStrategyDispatcher
- extends Object
- implements StrategyDispatcher
Delegate handling jobs on to a range of handlers.
- Author:
- Cheng-Yang(Louis) Tang, Matthew Pocock
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultiplexingStrategyDispatcher
public MultiplexingStrategyDispatcher()
MultiplexingStrategyDispatcher
public MultiplexingStrategyDispatcher(Set<StrategyDispatcher> dispatchers)
registerHandler
public void registerHandler(StrategyDispatcher dispatcher)
deRegisterHandler
public void deRegisterHandler(StrategyDispatcher dispatcher)
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.