org.deegree.services.wps
Class ProcessExecution

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

public class ProcessExecution
extends java.lang.Object
implements ProcessletExecutionInfo

Encapsulates the status of a WPSProcess execution.

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

Constructor Summary
ProcessExecution(ExecuteRequest request, StorageLocation responseStorage, java.net.URL serviceInstance, java.util.List<RequestedOutput> outputParams, ProcessletOutputs outputs)
          Creates a new ProcessExecution for a Processlet that has been accepted for execution.
 
Method Summary
 ExecuteResponse createExecuteResponse()
          Creates an ExecuteResponse that reflects the current execution state.
 java.lang.String getAcceptedMessage()
          Returns optional additional human-readable text associated with the acceptance of the process execution.
 org.deegree.protocol.wps.WPSConstants.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.
 java.lang.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.tom.ows.CodeType getProcessId()
          Returns the "Identifier" for this process.
 java.lang.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.
 java.lang.String getSucceededMessage()
          Returns optional additional human-readable text associated with the successful finishing of the process execution.
 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.
 void setStartedMessage(java.lang.String msg)
          Allows the Processlet to provide a start message for the client.
 void setSucceededMessage(java.lang.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

ProcessExecution

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

Processing state is WPSConstants.ExecutionState.ACCEPTED.

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

getExecutionState

public org.deegree.protocol.wps.WPSConstants.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 java.lang.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 java.lang.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.tom.ows.CodeType getProcessId()
Returns the "Identifier" for this process.

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

getPauseMessage

public java.lang.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 java.lang.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.

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(java.lang.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(java.lang.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


Copyright © 2011. All Rights Reserved.