uk.ac.ncl.cs.instantsoap.mapprocessor
Class MapStrategyDispatcher
java.lang.Object
uk.ac.ncl.cs.instantsoap.mapprocessor.MapStrategyDispatcher
- All Implemented Interfaces:
- StrategyDispatcher
public class MapStrategyDispatcher
- extends Object
- implements StrategyDispatcher
A strategy dispatcher that delegates on to a DomProcessor.
- 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 |
MapStrategyDispatcher
public MapStrategyDispatcher(MapProcessor mapProcessor)
- Create a new instance, delegating to the processor.
- Parameters:
mapProcessor
- the MapProcessor
that will
process requests
getMapProcessor
public MapProcessor getMapProcessor()
- Get the processor that is currently handling requests.
- Returns:
- the
MapProcessor
handling requests
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 appName)
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.