2010-01-26 1.2.0

org.eclipse.soda.dk.epcglobal.llrp.helper.task
Class AbstractTask_ACCESS_TAG

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.task.AbstractTask_ACCESS_TAG
All Implemented Interfaces:
ITask, ITaskListener
Direct Known Subclasses:
Task_BLOCKERASE_TAG, Task_BLOCKWRITE_TAG, Task_KILL_TAG, Task_LOCK_TAG, Task_READ_TAG, Task_WRITE_TAG

public abstract class AbstractTask_ACCESS_TAG
extends AbstractTask
implements ITaskListener

Since:
1.0
Version:
1.2.0

Field Summary
static java.lang.String OPERATIONID_KEY
          Define the operationid key (String) constant.
static java.lang.String RESULTCODE_KEY
          Define the resultcode key (String) constant.
static java.lang.String SUCCESSCOUNT_KEY
          Define the successcount key (String) constant.
static java.lang.String TAGREPORTDATA_KEY
          Define the tagreportdata key (String) constant.
static java.lang.String TIMESTAMP_KEY
          Define the timestamp key (String) constant.
 
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.ITask
ABORT, ERROR, REPORT, STATE_RUNNING, STATE_STANDBY, SUCCESS, TIMEOUT
 
Constructor Summary
protected AbstractTask_ACCESS_TAG(int accessOpId, int operationCount, Task_DELETE_EXIST_ACCESSSPEC task_delete_exist_accessspec, Task_ADD_ACCESSSPEC task_add_accessspec, Task_ENABLE_ACCESSSPEC task_enable_accessspec, SignalService rOAccessReport)
          Constructs an instance of this class from the specified access op id, operation count, taskdeleteexistaccessspec, taskaddaccessspec, taskenableaccessspec and r oaccess report parameters.
protected AbstractTask_ACCESS_TAG(int accessOpId, int operationCount, Task_DELETE_EXIST_ACCESSSPEC task_delete_exist_accessspec, Task_ADD_ACCESSSPEC task_add_accessspec, Task_ENABLE_ACCESSSPEC task_enable_accessspec, SignalService rOAccessReport, long timeoutValue, java.lang.String operationId)
          Constructs an instance of this class from the specified write op id, taskaddaccessspec, taskenableaccessspec, taskdisableaccessspec and r oaccess report parameters.
protected AbstractTask_ACCESS_TAG(int accessOpId, Task_DELETE_EXIST_ACCESSSPEC task_delete_exist_accessspec, Task_ADD_ACCESSSPEC task_add_accessspec, Task_ENABLE_ACCESSSPEC task_enable_accessspec, SignalService rOAccessReport, long timeoutValue, java.lang.String operationId)
          Constructs an instance of this class from the specified access op id, taskdeleteexistaccessspec, taskaddaccessspec, taskenableaccessspec, r oaccess report, timeout value and operation id parameters.
 
Method Summary
protected  void addTagToCache(java.lang.String tagId)
          Add tag to cache with the specified tag id parameter.
protected  int getAccessOpId()
          Gets the access op ID (int) value.
protected  int getAccessSpecId()
          Gets the access spec ID (int) value.
protected  java.lang.String getOperationId()
          Gets the operation ID (String) value.
protected abstract  java.lang.String getOpSpecResultKey()
          Gets the op spec result key (String) value.
protected abstract  java.lang.String getOpSpecResultParameterKey()
          Gets the op spec result parameter key (String) value.
protected abstract  int getOpSpecSuccessResultCode()
          Gets the op spec success result code (int) value.
 void handleResponse(SignalService source, java.lang.Object timestamp, java.lang.Object data)
          Handle response with the specified source, timestamp and data parameters.
protected  void initialize()
          Initialize.
protected  boolean isDuplicateTag(java.lang.String tagId)
          Is duplicate tag with the specified tag id parameter and return the boolean result.
 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 launchTask()
          Launch task and return the boolean result.
protected  void oneFailureOccurred()
          One failure occurred.
protected  void oneSuccessOccurred()
          One success occurred.
protected  void preNotifyListener(java.lang.String taskName, int status, java.lang.Object result)
          Pre notify listener with the specified task name, status and result parameters.
protected  void processTag(java.util.Map paramMap, java.lang.Object timestamp)
          Is write tag success with the specified param map parameter and return the boolean result.
protected  void reportAccess(java.util.Map tagReportData, java.lang.Object timestamp, java.lang.Number resultCode)
          Report access with the specified tag report data, timestamp and result code parameters.
 void reset()
          Reset.
protected  void taskFinished(int status)
          Task finished with the specified status parameter.
 void taskNotice(java.lang.String taskName, int status, java.lang.Object result)
          Task notice with the specified task name, status and result parameters.
protected  void timeOutOccurred()
          Time out occurred.
 
Methods inherited from class org.eclipse.soda.dk.epcglobal.llrp.helper.taskmanager.AbstractTask
abort, addTaskListener, getState, getTaskListeners, getTaskManager, getTaskOwner, isRemoveListenerRequired, notifyListener, removeTaskListener, removeTaskListenerNoThread, setState, setTaskListeners, setTaskManager, setTaskOwner, start, start, startTimer, stopTimer
 
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
duplicateTask, getTaskName
 

Field Detail

TAGREPORTDATA_KEY

public static final java.lang.String TAGREPORTDATA_KEY
Define the tagreportdata key (String) constant.

See Also:
Constant Field Values

RESULTCODE_KEY

public static final java.lang.String RESULTCODE_KEY
Define the resultcode key (String) constant.

See Also:
Constant Field Values

TIMESTAMP_KEY

public static final java.lang.String TIMESTAMP_KEY
Define the timestamp key (String) constant.

See Also:
Constant Field Values

OPERATIONID_KEY

public static final java.lang.String OPERATIONID_KEY
Define the operationid key (String) constant.

See Also:
Constant Field Values

SUCCESSCOUNT_KEY

public static final java.lang.String SUCCESSCOUNT_KEY
Define the successcount key (String) constant.

See Also:
Constant Field Values
Constructor Detail

AbstractTask_ACCESS_TAG

protected AbstractTask_ACCESS_TAG(int accessOpId,
                                  int operationCount,
                                  Task_DELETE_EXIST_ACCESSSPEC task_delete_exist_accessspec,
                                  Task_ADD_ACCESSSPEC task_add_accessspec,
                                  Task_ENABLE_ACCESSSPEC task_enable_accessspec,
                                  SignalService rOAccessReport)
Constructs an instance of this class from the specified access op id, operation count, taskdeleteexistaccessspec, taskaddaccessspec, taskenableaccessspec and r oaccess report parameters.

Parameters:
accessOpId - The access op id (int) parameter.
operationCount - The operation count (int) parameter.
task_delete_exist_accessspec - The taskdeleteexistaccessspec (Task_DELETE_EXIST_ACCESSSPEC) parameter.
task_add_accessspec - The taskaddaccessspec (Task_ADD_ACCESSSPEC) parameter.
task_enable_accessspec - The taskenableaccessspec (Task_ENABLE_ACCESSSPEC) parameter.
rOAccessReport - The r oaccess report (SignalService) parameter.
See Also:
AbstractTask_ACCESS_TAG(int,Task_DELETE_EXIST_ACCESSSPEC,Task_ADD_ACCESSSPEC,Task_ENABLE_ACCESSSPEC,SignalService,long,String), AbstractTask_ACCESS_TAG(int,int,Task_DELETE_EXIST_ACCESSSPEC,Task_ADD_ACCESSSPEC,Task_ENABLE_ACCESSSPEC,SignalService,long,String)

AbstractTask_ACCESS_TAG

protected AbstractTask_ACCESS_TAG(int accessOpId,
                                  Task_DELETE_EXIST_ACCESSSPEC task_delete_exist_accessspec,
                                  Task_ADD_ACCESSSPEC task_add_accessspec,
                                  Task_ENABLE_ACCESSSPEC task_enable_accessspec,
                                  SignalService rOAccessReport,
                                  long timeoutValue,
                                  java.lang.String operationId)
Constructs an instance of this class from the specified access op id, taskdeleteexistaccessspec, taskaddaccessspec, taskenableaccessspec, r oaccess report, timeout value and operation id parameters.

Parameters:
accessOpId - The access op id (int) parameter.
task_delete_exist_accessspec - The taskdeleteexistaccessspec (Task_DELETE_EXIST_ACCESSSPEC) parameter.
task_add_accessspec - The taskaddaccessspec (Task_ADD_ACCESSSPEC) parameter.
task_enable_accessspec - The taskenableaccessspec (Task_ENABLE_ACCESSSPEC) parameter.
rOAccessReport - The r oaccess report (SignalService) parameter.
timeoutValue - The timeout value (long) parameter.
operationId - The operation id (String) parameter.
See Also:
AbstractTask_ACCESS_TAG(int,int,Task_DELETE_EXIST_ACCESSSPEC,Task_ADD_ACCESSSPEC,Task_ENABLE_ACCESSSPEC,SignalService), AbstractTask_ACCESS_TAG(int,int,Task_DELETE_EXIST_ACCESSSPEC,Task_ADD_ACCESSSPEC,Task_ENABLE_ACCESSSPEC,SignalService,long,String)

AbstractTask_ACCESS_TAG

protected AbstractTask_ACCESS_TAG(int accessOpId,
                                  int operationCount,
                                  Task_DELETE_EXIST_ACCESSSPEC task_delete_exist_accessspec,
                                  Task_ADD_ACCESSSPEC task_add_accessspec,
                                  Task_ENABLE_ACCESSSPEC task_enable_accessspec,
                                  SignalService rOAccessReport,
                                  long timeoutValue,
                                  java.lang.String operationId)
Constructs an instance of this class from the specified write op id, taskaddaccessspec, taskenableaccessspec, taskdisableaccessspec and r oaccess report parameters.

Parameters:
accessOpId - The write op id (int) parameter.
operationCount - The operation count (int) parameter.
task_delete_exist_accessspec - The taskdeleteexistaccessspec (Task_DELETE_EXIST_ACCESSSPEC) parameter.
task_add_accessspec - The taskaddaccessspec (Task_ADD_ACCESSSPEC) parameter.
task_enable_accessspec - The taskenableaccessspec (Task_ENABLE_ACCESSSPEC) parameter.
rOAccessReport - The r oaccess report (SignalService) parameter.
timeoutValue - The timeout value (long) parameter.
operationId - The operation id (String) parameter.
See Also:
AbstractTask_ACCESS_TAG(int,int,Task_DELETE_EXIST_ACCESSSPEC,Task_ADD_ACCESSSPEC,Task_ENABLE_ACCESSSPEC,SignalService), AbstractTask_ACCESS_TAG(int,Task_DELETE_EXIST_ACCESSSPEC,Task_ADD_ACCESSSPEC,Task_ENABLE_ACCESSSPEC,SignalService,long,String)
Method Detail

addTagToCache

protected void addTagToCache(java.lang.String tagId)
Add tag to cache with the specified tag id parameter.

Parameters:
tagId - The tag id (String) parameter.

getAccessOpId

protected int getAccessOpId()
Gets the access op ID (int) value.

Returns:
The access op id (int) value.

getAccessSpecId

protected int getAccessSpecId()
Gets the access spec ID (int) value.

Returns:
The access spec id (int) value.

getOpSpecResultKey

protected abstract java.lang.String getOpSpecResultKey()
Gets the op spec result key (String) value.

Returns:
The op spec result key (String) value.

getOpSpecResultParameterKey

protected abstract java.lang.String getOpSpecResultParameterKey()
Gets the op spec result parameter key (String) value.

Returns:
The op spec result parameter key (String) value.

getOpSpecSuccessResultCode

protected abstract int getOpSpecSuccessResultCode()
Gets the op spec success result code (int) value.

Returns:
The op spec success result code (int) value.

getOperationId

protected java.lang.String getOperationId()
Gets the operation ID (String) value.

Returns:
The operation id (String) value.

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
Parameters:
source - The source (SignalService) parameter.
timestamp - The timestamp (Object) parameter.
data - The data (Object) parameter.

initialize

protected void initialize()
Initialize.


isDuplicateTag

protected boolean isDuplicateTag(java.lang.String tagId)
Is duplicate tag with the specified tag id parameter and return the boolean result.

Parameters:
tagId - The tag id (String) parameter.
Returns:
Results of the is duplicate tag (boolean) value.

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.

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:
ITask.duplicateTask(ITask)

oneFailureOccurred

protected void oneFailureOccurred()
One failure occurred.


oneSuccessOccurred

protected void oneSuccessOccurred()
One success occurred.


preNotifyListener

protected void preNotifyListener(java.lang.String taskName,
                                 int status,
                                 java.lang.Object result)
Pre notify listener with the specified task name, status and result parameters.

Overrides:
preNotifyListener in class AbstractTask
Parameters:
taskName - The task name (String) parameter.
status - The status (int) parameter.
result - The result (Object) parameter.

processTag

protected void processTag(java.util.Map paramMap,
                          java.lang.Object timestamp)
Is write tag success with the specified param map parameter and return the boolean result.

Parameters:
paramMap - The param map (Map) parameter.
timestamp - The timestamp (Object) parameter.
See Also:
isDuplicateTag(String)

reportAccess

protected void reportAccess(java.util.Map tagReportData,
                            java.lang.Object timestamp,
                            java.lang.Number resultCode)
Report access with the specified tag report data, timestamp and result code parameters.

Parameters:
tagReportData - The tag report data (Map) parameter.
timestamp - The timestamp (Object) parameter.
resultCode - The result code (Integer) parameter.

reset

public void reset()
Reset.

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

taskFinished

protected void taskFinished(int status)
Task finished with the specified status parameter.

Parameters:
status - The status (int) parameter.

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.

timeOutOccurred

protected void timeOutOccurred()
Time out occurred.

Overrides:
timeOutOccurred in class AbstractTask

2010-01-26 1.2.0

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