deegree-services-3.0-pre-nightly (2010/03/05 00:04) - official

org.deegree.services.controller.wps
Class ExecutionManager

java.lang.Object
  extended by org.deegree.services.controller.wps.ExecutionManager

public class ExecutionManager
extends Object

Responsible for handling Execute requests sent to the WPSController. Also keeps track of the process executions.

Version:
$Revision: $, $Date: $
Author:
Markus Schneider, Jason R. Surratt, last edited by: $Author: schneider $
See Also:
WPSController

Constructor Summary
ExecutionManager(WPSController master, StorageManager storageManager)
          Creates a new ExecutionManager for a WPSController.
 
Method Summary
 Collection<ProcessletExecution> getAllProcesses()
          Returns a collection of information on all processes, including processes that haven't run, are running and have already stopped.
(package private)  ProcessletExecution getPendingExecutionState(StorageLocation location)
          Returns the ProcessletExecution for a given response document location.
 Collection<ProcessletExecution> getRunningProcesses()
          Returns a collection of information on all running processes.
(package private)  void handleRawDataOutput(ExecuteRequest request, HttpResponseBuffer response, Processlet process)
          Handles ExecuteRequest requests that shall return a single "raw" output param (with no encapsulating document) directly in the HTTP response body.
(package private)  void handleResponseDocumentOutput(ExecuteRequest request, HttpResponseBuffer response, Processlet process)
          Handles ExecuteRequest requests that shall return their output encapsulated in a response document.
(package private)  void sendResponseDocument(HttpResponseBuffer response, ResponseDocumentStorage location)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecutionManager

ExecutionManager(WPSController master,
                 StorageManager storageManager)
Creates a new ExecutionManager for a WPSController.

Parameters:
master - WPSController that will delegate the processing of execute requests
storageManager - used for creating storage locations for web-accessible resources (response documents / process outputs)
Method Detail

getAllProcesses

public Collection<ProcessletExecution> getAllProcesses()
Returns a collection of information on all processes, including processes that haven't run, are running and have already stopped.

Returns:
Returns a collection of information on all processes, including processes that haven't run, are running and have already stopped. The returned result should not be modified.

getRunningProcesses

public Collection<ProcessletExecution> getRunningProcesses()
Returns a collection of information on all running processes.

Returns:
Returns a collection of information on all running processes. The returned result should not be modified.

handleRawDataOutput

void handleRawDataOutput(ExecuteRequest request,
                         HttpResponseBuffer response,
                         Processlet process)
                   throws IOException,
                          ProcessletException,
                          XMLStreamException,
                          OWSException
Handles ExecuteRequest requests that shall return a single "raw" output param (with no encapsulating document) directly in the HTTP response body.

RawDataOutput always implies that the Processlet is executed synchronously, i.e. in the calling thread.

Parameters:
request - request to be executed
response - provides access to the HTTP response
process - process to be invoked
Throws:
IOException
ProcessletException
XMLStreamException
OWSException

handleResponseDocumentOutput

void handleResponseDocumentOutput(ExecuteRequest request,
                                  HttpResponseBuffer response,
                                  Processlet process)
                            throws OWSException,
                                   ProcessletException,
                                   XMLStreamException,
                                   IOException
Handles ExecuteRequest requests that shall return their output encapsulated in a response document.

The Processlet may be executed synchronously (storeExecuteResponse=false) or asynchronously (storeExecuteResponse=true).

Parameters:
request - request to be executed
response - provides access to the HTTP response
process - process to be invoked
Throws:
OWSException
ProcessletException
IOException
XMLStreamException

sendResponseDocument

void sendResponseDocument(HttpResponseBuffer response,
                          ResponseDocumentStorage location)

getPendingExecutionState

ProcessletExecution getPendingExecutionState(StorageLocation location)
Returns the ProcessletExecution for a given response document location.

Parameters:
location - storage location of a response document
Returns:
the ProcessletExecution of the corresponding process if it is still running, null otherwise

deegree-services-3.0-pre-nightly (2010/03/05 00:04) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>