uk.ac.ncl.cs.instantsoap.wsapi
Interface WebServiceDispatcher

All Known Implementing Classes:
WebServiceDispatcherImpl

public interface WebServiceDispatcher

The Web Service interface for executing jobs.

The Web Service is responsible for exposing both synchronous and asynchronous jobManager exectution models. It is also responsible for providing meta-data about the applications, their inputs and their outputs.

Implementation Notes

We would expect this to be implemented by delegating synchronous invocations to a SynchronousServiceDispatcher and the others to an AsynchronousServiceDispatcher.

Created: Tue May 09 16:42:07 2006

Version:
1.0
Author:
Phillip Lord, Matthew Pocock, Cheng-Yang(Louis) Tang

Method Summary
 MetaData describeApplication(String application)
          Describe an application.
 List<MetaData> getInputs(String application)
          Describe the inputs of an application.
 List<MetaData> getOutputs(String application)
          Describe the outputs of an application.
 BlockedInvocationResponse invokeAndBlock(JobSpecification jobSpec)
          Invoke the jobManager, and return the result.
 NonBlockingInvocationResponse invokeNonBlocking(JobSpecification jobSpec)
          Invoke the jobManager, returning immediately.
 List<String> listApplications()
          List all of the applications known by this service.
 NonBlockingInvocationResponse pollForResult(UUID uuid)
          Poll the jobManager for completion.
 

Method Detail

listApplications

List<String> listApplications()
List all of the applications known by this service.

Returns:
a List of Strings of names of applications

describeApplication

MetaData describeApplication(String application)
                             throws UnknownApplicationException
Describe an application.

Parameters:
application - the name of the application to describe
Returns:
a MetaData instance capturing the name, and potentially description and semantic annotation of the application
Throws:
UnknownApplicationException

getInputs

List<MetaData> getInputs(String application)
                         throws UnknownApplicationException
Describe the inputs of an application.

Parameters:
application - the name of the application to find inputs for
Returns:
a List of MetaData objects describing the inputs of the application
Throws:
UnknownApplicationException

getOutputs

List<MetaData> getOutputs(String application)
                          throws UnknownApplicationException
Describe the outputs of an application.

Parameters:
application - the name of the application to find outputs for
Returns:
a List of MetaData objects describing the outputs of the application
Throws:
UnknownApplicationException

invokeAndBlock

BlockedInvocationResponse invokeAndBlock(JobSpecification jobSpec)
                                         throws OperationUnavailableException,
                                                InvalidJobSpecificationException,
                                                JobExecutionException
Invoke the jobManager, and return the result. This will block for as long as necessary to run the jobManager, or until one of the intermediate components times out.

Parameters:
jobSpec - specify the jobManager to run
Returns:
an BlockedInvocationResponse containing the SerializableUuid and result of the jobManager
Throws:
InvalidJobSpecificationException - if the service is unable to process jobSpecification
JobExecutionException - if there was a failure from execution of the jobManager
OperationUnavailableException - if this operation is not supported by this dispatcher

invokeNonBlocking

NonBlockingInvocationResponse invokeNonBlocking(JobSpecification jobSpec)
                                                throws InvalidJobSpecificationException,
                                                       JobExecutionException
Invoke the jobManager, returning immediately.

This will either return the result directly or when to poll for the result. The SerializableUuid for this response will be unique to this invocation.

Parameters:
jobSpec - specify the jobManager to run
Returns:
a NonBlockingInvocationResponse either containing the result or the poll information
Throws:
InvalidJobSpecificationException - if the service is unable to process jobSpecification
JobExecutionException - if there was a failure from execution of the jobManager

pollForResult

NonBlockingInvocationResponse pollForResult(UUID uuid)
                                            throws UnknownUuidException,
                                                   JobExecutionException
Poll the jobManager for completion.

The SerializableUuid will be a value returned previously via invokeNonBlocking. This will either return the result directly or when to poll again for the result.

Parameters:
uuid - the SerializableUuid of the jobManager to poll
Returns:
a NonBlockingInvocationResponse either containing the result or the poll information
Throws:
UnknownUuidException - if the SerializableUuid is not known
JobExecutionException - if there was a failure from execution of the jobSpecification


Copyright © 2006-2008. All Rights Reserved.