SAP NetWeaver '04

com.sapportals.wcm.service.taskqueue
Class TaskState

[contained in: com.sap.netweaver.bc.sf.service.par - bc.sf.service.taskqueue_api.jar]
java.lang.Object
  |
  +--com.sapportals.wcm.util.enum.AbstractEnum
        |
        +--com.sapportals.wcm.service.taskqueue.TaskState
All Implemented Interfaces:
java.io.Serializable

public class TaskState
extends AbstractEnum

This class defines the identifiers for the different lifecycle states of a task in the task queue service.

If a new task is added to the task queue the task's state will be set to NEW. If a task is fetched from the queue it's state will be set to ACTIVE to indicate that the task is currently being processed. The processor itself should set the task's state to DONE ifthe task was processed sucessfully or ERROR if the task failed.

If an active task is added to ther queue an exception will be raised. It is possible to add tasks that are done (have the DONE-state) to run them once again.

Copyright 2004 SAP AG

See Also:
Serialized Form

Field Summary
static TaskState ACTIVE
          A task fetched from the task queue is set to this state by the task queue service.
static TaskState DONE
          A processor that sucessfully finished the task sets this state.
static TaskState ERROR
          A processor that failed to execute this tasks sets this state.
static TaskState NEW
          A task added to the task queue is set to this state.
 
Fields inherited from class com.sapportals.wcm.util.enum.AbstractEnum
description, m_code
 
Method Summary
static TaskState getTaskState(int state)
          Converts a task state string representation to a task state object
 int getValue()
          Gets the value attribute of the TaskState object
 java.lang.String toString()
          Overrides java.lan.Object.toString
 
Methods inherited from class com.sapportals.wcm.util.enum.AbstractEnum
equals
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NEW

public static final TaskState NEW
A task added to the task queue is set to this state.

ACTIVE

public static final TaskState ACTIVE
A task fetched from the task queue is set to this state by the task queue service.
See Also:
ITaskQueueReader.get(), ITaskQueue.get()

ERROR

public static final TaskState ERROR
A processor that failed to execute this tasks sets this state.

DONE

public static final TaskState DONE
A processor that sucessfully finished the task sets this state.
Method Detail

getValue

public int getValue()
Gets the value attribute of the TaskState object
Overrides:
getValue in class AbstractEnum
Returns:
The value value

toString

public java.lang.String toString()
Overrides java.lan.Object.toString
Overrides:
toString in class AbstractEnum
Returns:
TBD: Description of the outgoing return value

getTaskState

public static TaskState getTaskState(int state)
Converts a task state string representation to a task state object
Parameters:
state - Description of the Parameter
Returns:
The task state object or null if this state is unknown

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.