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

org.deegree.services.controller.wps
Class ProcessletExecution

java.lang.Object
  extended by org.deegree.services.controller.wps.ProcessletExecution
All Implemented Interfaces:
ProcessletExecutionInfo

public class ProcessletExecution
extends Object
implements ProcessletExecutionInfo

Encapsulates the status of a Processlet execution.

Version:
$Revision: $, $Date: $
Author:
Alexander Padberg, Markus Schneider, last edited by: $Author: $

Nested Class Summary
static class ProcessletExecution.ExecutionState
           
 
Constructor Summary
ProcessletExecution(ExecuteRequest request, StorageLocation responseStorage, URL serviceInstance, List<RequestedOutput> outputParams, ProcessletOutputs outputs)
          Creates a new ProcessletExecution for a Processlet that has been accepted for execution.
 
Method Summary
 ExecuteResponse createExecuteResponse()
          Creates an ExecuteResponse that reflects the current execution state.
 String getAcceptedMessage()
          Returns optional additional human-readable text associated with the acceptance of the process execution.
 ProcessletExecution.ExecutionState getExecutionState()
          Returns the current processing state.
 OWSException getFailedException()
          Returns the exception that describes the reason for the failure of the process execution.
 long getFinishTime()
          Returns the time that the process execution has been finished.
 String getPauseMessage()
          Returns optional additional human-readable text associated with the pausing of the process execution.
 int getPercentCompleted()
          Returns the percentage of process that has been completed, where 0 means the process has just started, and 99 means the process is almost complete.
 org.deegree.commons.types.ows.CodeType getProcessId()
          Returns the "Identifier" for this process.
 String getStartMessage()
          Returns optional additional human-readable text associated with the starting of the process execution.
 long getStartTime()
          Returns the time when the process execution has been started.
 String getSucceededMessage()
          Returns optional additional human-readable text associated with the successful finishing of the process execution.
(package private)  void setFailed(OWSException e)
          Sets the processing state to ProcessletExecution.ExecutionState.FAILED.
(package private)  void setPaused(String msg)
          Sets the processing state to ProcessletExecution.ExecutionState.PAUSED.
 void setPercentCompleted(int percentCompleted)
          Allows the Processlet to indicate the percentage of the process that has been completed, where 0 means the process has just started, and 99 means the process is almost complete.
(package private)  void setStarted()
          Sets the processing state to ProcessletExecution.ExecutionState.STARTED.
 void setStartedMessage(String msg)
          Allows the Processlet to provide a start message for the client.
(package private)  void setSucceeded(String msg)
          Sets the processing state to ProcessletExecution.ExecutionState.SUCCEEDED.
 void setSucceededMessage(String msg)
          Allows the Processlet to provide a finish message for the client.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessletExecution

public ProcessletExecution(ExecuteRequest request,
                           StorageLocation responseStorage,
                           URL serviceInstance,
                           List<RequestedOutput> outputParams,
                           ProcessletOutputs outputs)
Creates a new ProcessletExecution for a Processlet that has been accepted for execution.

Processing state is ProcessletExecution.ExecutionState.ACCEPTED.

Parameters:
request -
responseStorage -
serviceInstance -
outputParams -
outputs -
Method Detail

getExecutionState

public ProcessletExecution.ExecutionState getExecutionState()
Returns the current processing state.

Returns:
the current processing state

getPercentCompleted

public int getPercentCompleted()
Returns the percentage of process that has been completed, where 0 means the process has just started, and 99 means the process is almost complete. This value is expected to be accurate to within ten percent.

Returns:
the percentCompleted, a number between 0 and 99

getAcceptedMessage

public String getAcceptedMessage()
Returns optional additional human-readable text associated with the acceptance of the process execution.

Returns:
optional additional human-readable text, null if it is not available

getStartMessage

public String getStartMessage()
Returns optional additional human-readable text associated with the starting of the process execution.

Returns:
optional additional human-readable text, null if it is not available

getStartTime

public long getStartTime()
Returns the time when the process execution has been started.

Returns:
the time when the process execution has been started (in milliseconds) or -1 if the process has not been started yet

getFinishTime

public long getFinishTime()
Returns the time that the process execution has been finished.

Returns:
the time that the process execution has been finished (in milliseconds) or -1 if the process has not been finished yet

getProcessId

public org.deegree.commons.types.ows.CodeType getProcessId()
Returns the "Identifier" for this process.

Returns:
Returns the CodeType or "Identifier" for this process.

getPauseMessage

public String getPauseMessage()
Returns optional additional human-readable text associated with the pausing of the process execution.

Returns:
optional additional human-readable text, null if it is not available

getSucceededMessage

public String getSucceededMessage()
Returns optional additional human-readable text associated with the successful finishing of the process execution.

Returns:
optional additional human-readable text, null if it is not available

getFailedException

public OWSException getFailedException()
Returns the exception that describes the reason for the failure of the process execution.

Returns:
the exception that describes the reason for the failure of the process execution.

setStarted

void setStarted()
Sets the processing state to ProcessletExecution.ExecutionState.STARTED.


setSucceeded

void setSucceeded(String msg)
Sets the processing state to ProcessletExecution.ExecutionState.SUCCEEDED.

Parameters:
msg - additional human-readable client information, may be null

setPaused

void setPaused(String msg)
Sets the processing state to ProcessletExecution.ExecutionState.PAUSED.

Parameters:
msg - additional human-readable client information, may be null

setFailed

void setFailed(OWSException e)
Sets the processing state to ProcessletExecution.ExecutionState.FAILED.

Parameters:
e - exception that describes the reason for the failure

createExecuteResponse

public ExecuteResponse createExecuteResponse()
Creates an ExecuteResponse that reflects the current execution state.

Returns:
an ExecuteResponse that reflects the current execution state

setStartedMessage

public void setStartedMessage(String msg)
Description copied from interface: ProcessletExecutionInfo
Allows the Processlet to provide a start message for the client.

Specified by:
setStartedMessage in interface ProcessletExecutionInfo

setSucceededMessage

public void setSucceededMessage(String msg)
Description copied from interface: ProcessletExecutionInfo
Allows the Processlet to provide a finish message for the client.

Specified by:
setSucceededMessage in interface ProcessletExecutionInfo

setPercentCompleted

public void setPercentCompleted(int percentCompleted)
Description copied from interface: ProcessletExecutionInfo
Allows the Processlet to indicate the percentage of the process that has been completed, where 0 means the process has just started, and 99 means the process is almost complete. This value is expected to be accurate to within ten percent.

Specified by:
setPercentCompleted in interface ProcessletExecutionInfo
Parameters:
percentCompleted - the percentage value to be set, a number between 0 and 99

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

]]>