2009-10-01 1.2.0

org.eclipse.soda.dk.epcglobal.llrp.helper.taskmanager
Class TaskManager

java.lang.Object
  extended by EscObject
      extended by org.eclipse.soda.dk.epcglobal.llrp.helper.taskmanager.AbstractTask
          extended by org.eclipse.soda.dk.epcglobal.llrp.helper.taskmanager.TaskManager
All Implemented Interfaces:
ITask, ITaskListener, ITaskManager

public class TaskManager
extends AbstractTask
implements ITaskListener, ITaskManager

Since:
1.0
Version:
1.2.0

Field Summary
 
Fields inherited from class org.eclipse.soda.dk.epcglobal.llrp.helper.taskmanager.AbstractTask
EMPTY_RESULT, listenerLock, timerLock
 
Fields inherited from interface org.eclipse.soda.dk.epcglobal.llrp.helper.taskmanager.ITaskManager
STANDBY, STOPPED, TOPTASKRUNNING
 
Fields inherited from interface org.eclipse.soda.dk.epcglobal.llrp.helper.taskmanager.ITask
ABORT, ERROR, REPORT, STATE_RUNNING, STATE_STANDBY, SUCCESS, TIMEOUT
 
Constructor Summary
TaskManager(java.lang.String name)
          Constructs an instance of this class.
TaskManager(java.lang.String name, int state)
          Constructs an instance of this class from the specified state parameter.
 
Method Summary
 void abort()
          Abort.
 void addTask(ITask task)
          Add task with the specified task parameter.
 void addTaskToBottom(ITask task, boolean checkDup)
          Add task to bottom with the specified task and check dup parameters.
 void addTaskToTop(ITask task, boolean checkDup)
          Add task to top with the specified task and check dup parameters.
 void clearTasksByOwner(java.lang.Object taskOwner)
          Clear tasks by owner with the specified task owner parameter.
 boolean duplicateTask(ITask task)
          Duplicate task with the specified task parameter and return the boolean result.
 java.lang.String getStrState()
          Gets the str state (String) value.
 java.lang.String getTaskName()
          Gets the task name (String) value.
 ITask getTopTask()
          Gets the top task (ITask) value.
 void handleResponse(SignalService source, java.lang.Object timestamp, java.lang.Object data)
          Handle response with the specified source, timestamp and data parameters.
 boolean isResponseExpected(SignalService source, java.lang.Object timestamp, java.lang.Object data)
          Is response expected with the specified source, timestamp and data parameters and return the boolean result.
 boolean isTaskListEmpty()
          Gets the task list empty (boolean) value.
 boolean launchTask()
          Launch task and return the boolean result.
protected  boolean launchTopTask()
          Launch top task and return the boolean result.
 void removeTask(ITask task)
          Remove task with the specified task parameter.
 void reset()
          Reset.
 void taskNotice(java.lang.String taskName, int status, java.lang.Object result)
          Task notice with the specified task name, status and result parameters.
 
Methods inherited from class org.eclipse.soda.dk.epcglobal.llrp.helper.taskmanager.AbstractTask
addTaskListener, getState, getTaskListeners, getTaskManager, getTaskOwner, isRemoveListenerRequired, notifyListener, preNotifyListener, removeTaskListener, removeTaskListenerNoThread, setState, setTaskListeners, setTaskManager, setTaskOwner, start, start, startTimer, stopTimer, timeOutOccurred
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.soda.dk.epcglobal.llrp.helper.taskmanager.ITask
addTaskListener, getTaskManager, getTaskOwner, notifyListener, removeTaskListener, setTaskManager, setTaskOwner, start, start
 

Constructor Detail

TaskManager

public TaskManager(java.lang.String name)
Constructs an instance of this class.

Parameters:
name - The name (String) parameter.
See Also:
TaskManager(String,int)

TaskManager

public TaskManager(java.lang.String name,
                   int state)
Constructs an instance of this class from the specified state parameter.

Parameters:
name - The name (String) parameter.
state - The state (int) parameter.
See Also:
TaskManager(String)
Method Detail

abort

public void abort()
Abort.

Specified by:
abort in interface ITask
Overrides:
abort in class AbstractTask

addTask

public void addTask(ITask task)
Add task with the specified task parameter.

Specified by:
addTask in interface ITaskManager
Parameters:
task - The task (ITask) parameter.
See Also:
duplicateTask(ITask), getTopTask(), launchTask(), launchTopTask(), removeTask(ITask)

addTaskToBottom

public void addTaskToBottom(ITask task,
                            boolean checkDup)
Add task to bottom with the specified task and check dup parameters.

Parameters:
task - The task (ITask) parameter.
checkDup - The check dup (boolean) parameter.

addTaskToTop

public void addTaskToTop(ITask task,
                         boolean checkDup)
Add task to top with the specified task and check dup parameters.

Parameters:
task - The task (ITask) parameter.
checkDup - The check dup (boolean) parameter.

clearTasksByOwner

public void clearTasksByOwner(java.lang.Object taskOwner)
Clear tasks by owner with the specified task owner parameter.

Specified by:
clearTasksByOwner in interface ITaskManager
Parameters:
taskOwner - The task owner (Object) parameter.

duplicateTask

public boolean duplicateTask(ITask task)
Duplicate task with the specified task parameter and return the boolean result.

Specified by:
duplicateTask in interface ITask
Parameters:
task - The task (ITask) parameter.
Returns:
Results of the duplicate task (boolean) value.
See Also:
addTask(ITask), getTopTask(), launchTask(), launchTopTask(), removeTask(ITask)

getStrState

public java.lang.String getStrState()
Gets the str state (String) value.

Returns:
The str state (String) value.
Since:
1.2

getTaskName

public java.lang.String getTaskName()
Gets the task name (String) value.

Specified by:
getTaskName in interface ITask
Returns:
The task name (String) value.

getTopTask

public ITask getTopTask()
Gets the top task (ITask) value.

Returns:
The top task (ITask) value.
See Also:
launchTopTask()

handleResponse

public void handleResponse(SignalService source,
                           java.lang.Object timestamp,
                           java.lang.Object data)
Handle response with the specified source, timestamp and data parameters.

Specified by:
handleResponse in interface ITask
Specified by:
handleResponse in interface ITaskManager
Parameters:
source - The source (SignalService) parameter.
timestamp - The timestamp (Object) parameter.
data - The data (Object) parameter.

isResponseExpected

public boolean isResponseExpected(SignalService source,
                                  java.lang.Object timestamp,
                                  java.lang.Object data)
Is response expected with the specified source, timestamp and data parameters and return the boolean result.

Specified by:
isResponseExpected in interface ITask
Overrides:
isResponseExpected in class AbstractTask
Parameters:
source - The source (SignalService) parameter.
timestamp - The time stamp (Object) parameter.
data - The data (Object) parameter.
Returns:
Results of the is response expected (boolean) value.

isTaskListEmpty

public boolean isTaskListEmpty()
Gets the task list empty (boolean) value.

Returns:
The task list empty (boolean) value.

launchTask

public boolean launchTask()
Launch task and return the boolean result.

Specified by:
launchTask in interface ITask
Returns:
Results of the launch task (boolean) value.
See Also:
addTask(ITask), duplicateTask(ITask), getTopTask(), launchTopTask(), removeTask(ITask)

launchTopTask

protected boolean launchTopTask()
Launch top task and return the boolean result.

Returns:
Results of the launch top task (boolean) value.
See Also:
getTopTask()

removeTask

public void removeTask(ITask task)
Remove task with the specified task parameter.

Specified by:
removeTask in interface ITaskManager
Parameters:
task - The task (ITask) parameter.
See Also:
addTask(ITask), duplicateTask(ITask), getTopTask(), launchTask(), launchTopTask()

reset

public void reset()
Reset.

Specified by:
reset in interface ITask
Overrides:
reset in class AbstractTask

taskNotice

public void taskNotice(java.lang.String taskName,
                       int status,
                       java.lang.Object result)
Task notice with the specified task name, status and result parameters.

Specified by:
taskNotice in interface ITaskListener
Parameters:
taskName - The task name (String) parameter.
status - The status (int) parameter.
result - The result (Object) parameter.

2009-10-01 1.2.0

Copyright (c) 2009 IBM. See license in Legal section.