uk.ac.ncl.cs.instantsoap.servicedp
Interface AsynchronousServiceDispatcher

All Known Implementing Classes:
AsynchronousServiceDispatcherImpl

public interface AsynchronousServiceDispatcher

Invoke a job specification asynchronously.

The operations in this class will all return at the earliest opportunity. They will usually use other threads to do the actual work. Communication with be mediated by polling the dispatcher.

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

Method Summary
 MetaData describeApplication(String appName)
           
 NonBlockingInvocationResponse getExecutionResult(UUID uuid)
          Return the result of the jobManager.
 Set<MetaData> getInputs(String application)
           
 Set<MetaData> getOutputs(String application)
           
 UUID invoke(JobSpecification specification)
          Invoke the jobManager.
 List<String> listApplications()
           
 InvocationState pollState(UUID uuid)
          Poll the state of the invocation.
 

Method Detail

listApplications

List<String> listApplications()

describeApplication

MetaData describeApplication(String appName)
                             throws UnknownApplicationException
Throws:
UnknownApplicationException

getInputs

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

getOutputs

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

invoke

UUID invoke(JobSpecification specification)
            throws InvalidJobSpecificationException,
                   JobExecutionException,
                   UnknownApplicationException
Invoke the jobManager. This should return the SerializableUuid of the jobManager at the earliest opportunity. It should not in general block until the jobManager has completed running. The SerializableUuid returned should be unique.

Parameters:
specification - the JobSpecification of the jobManager to run
Returns:
the SerializableUuid of the jobManager
Throws:
InvalidJobSpecificationException - if the specification is invalid
JobExecutionException - if the execution failed
UnknownApplicationException

pollState

InvocationState pollState(UUID uuid)
                          throws UnknownUuidException,
                                 JobExecutionException
Poll the state of the invocation. This should return as soon as possible.

Parameters:
uuid - the SerializableUuid of the jobManager to be polled
Returns:
the state of the jobManager
Throws:
UnknownUuidException - if the uuid is not known by this dispatcher
JobExecutionException - if the job has failed

getExecutionResult

NonBlockingInvocationResponse getExecutionResult(UUID uuid)
                                                 throws UnknownUuidException,
                                                        IllegalInvocationStateException,
                                                        JobExecutionException
Return the result of the jobManager.

Parameters:
uuid -
Returns:
Throws:
UnknownUuidException - if the uuid is not known by this dispatcher
IllegalInvocationStateException - if the job associated with the uuid has not completed
JobExecutionException - if the job has failed


Copyright © 2006-2008. All Rights Reserved.