|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
A reader provides read-acces to a task queue belonging to a specific namespace.
Copyright (c) SAP AG 2003
| Method Summary | |
ITask |
get()
Removes the task at the top of the task queue and returns it. |
ITask |
get(long timeout)
Removes the task at the top of the task queue and returns it. |
java.lang.String |
getNamespace()
Returns the namespace of this reader. |
java.lang.String |
getUser()
Returns the user of this reader. |
boolean |
isEmpty()
Indicates if the queue still holds some tasks to process (and the get-method will return a task. |
void |
setState(ITask task,
TaskState state)
Sets the task's state to a new state . |
ITask |
top()
Returns the top elemet of the task queue. |
| Method Detail |
public ITask get()
throws WcmException
The task' state (former set to NEW by a writer is set ACTIVE during this
operation.
null if no task
exists.WcmException - Exception raised in failure situation
public ITask get(long timeout)
throws WcmException
This method returns when a task is found in the queue or a timeout
delay is reached. The task' state (former set to NEW by a writer is set ACTIVE during this operation.
timeout - The timeout delay in ms. If timeout is 0 the
method behaves like get(). When set to a negative value it
will never timeout.null if no task
exists.WcmException - Exception raised in failure situationget()
public ITask top()
throws WcmException
public void setState(ITask task,
TaskState state)
throws WcmException
state . The task must belong to
the reader's namespace. The new state must be a legal transition of the old
state (see ITask.getState()) for details.
Interactive users of the taskqueue service are only allowed to set the
state to TaskState.DONE and TaskState.ERROR. Other states
are set by the task queue service.
state - The state to set.task - The task to set the state.WcmException - Exception raised in failure situationpublic boolean isEmpty()
get-method will return a task.public java.lang.String getUser()
public java.lang.String getNamespace()
|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||