2010-01-26 1.2.0

org.eclipse.soda.dk.rfid.inventory.benchmark.servlet
Class RfidInventoryBenchmarkReader

java.lang.Object
  extended by org.eclipse.soda.dk.rfid.inventory.benchmark.servlet.RfidInventoryBenchmarkReader
All Implemented Interfaces:
IRfidInventoryBenchmarkReader

public class RfidInventoryBenchmarkReader
extends java.lang.Object
implements IRfidInventoryBenchmarkReader

Version:
1.2.0

Field Summary
 
Fields inherited from interface org.eclipse.soda.dk.rfid.inventory.benchmark.servlet.IRfidInventoryBenchmarkReader
BENCHMARK_REPORT_TOPIC, BENCHMARKING_GET_TOPIC, BENCHMARKING_TOPIC, BENCHMARKING_WRITE_TOPIC, CONTROLBIT_CHANGEREQUEST_TOPIC, EMPTY_STRING, TAG_REPORT_TOPIC, TAGREADING_GET_TOPIC, TAGREADING_TOPIC
 
Constructor Summary
RfidInventoryBenchmarkReader(java.lang.String prefix, NotificationService notificationService)
          Constructs an instance of this class from the specified prefix and notification service parameters.
 
Method Summary
protected  void benchmarkReportReceived(java.util.Map benchmarkReport)
          Benchmark report received with the specified benchmark report parameter.
 void clearBenchmarkReports()
          Clear benchmark reports.
protected  void controlTagRead(java.lang.Boolean state)
          Control tag read with the specified state parameter.
 void displayBenchmarkDetailReports(DeviceServletContext context, int serialNum)
          Display benchmark detail reports with the specified context and serial num parameters.
 java.util.List getBenchmarkDetailReports(int serialNum)
          Get benchmark detail reports with the specified serial num parameter and return the List result.
 java.lang.String getBenchmarkDetailReportStrin(int serialNum)
          Get benchmark detail report strin with the specified serial num parameter and return the String result.
 void getBenchmarkReport_ajax(DeviceServletContext context)
          Get benchmark report_ajax with the specified context parameter.
 java.util.List getBenchmarkReports()
          Gets the benchmark reports (List) value.
protected  java.util.Map getControlBitsMap(java.lang.String bit, java.lang.Boolean state)
          Get control bits map with the specified bit and state parameters and return the Map result.
 int getCurrentRunFinishedCycles()
          Gets the current run finished cycles (int) value.
 int getCurrentRunTotalCycle()
          Gets the current run total cycle (int) value.
 java.lang.String getLatestTagReportTimestamp()
          Gets the latest tag report time stamp (String) value.
 NotificationService getNotificationService()
          Gets the notification service value.
 java.lang.String getPrefix()
          Gets the prefix (String) value.
 boolean isBenchmarkEnabled()
          Gets the benchmark enabled (boolean) value.
protected  boolean isBenchmarkRunStopped()
          Gets the benchmark run stopped (boolean) value.
 boolean isTagreadStarted()
          Gets the tagread started (boolean) value.
 void notificationReceived(java.lang.String externalKey, java.util.Dictionary data)
          Notification received with the specified external key and data parameters.
protected  void sendRequest(java.lang.String topic, java.lang.Object request)
          Send request with the specified topic and request parameters.
 void setBenchmarking(boolean state)
          Sets the benchmarking value.
protected  void setBenchmarkRunStopped(boolean benchmarkRunStopped)
          Sets the benchmark run stopped value.
 void setBenchmarkState(java.lang.Boolean benchmarkEnabled)
          Sets the benchmark state value.
 void setCurrentRunFinishedCycles(int currentRunFinishedCycles)
          Sets the current run finished cycles value.
 void setCurrentRunTotalCycle(int currentRunTotalCycle)
          Sets the current run total cycle value.
 void setLatestTagReportTimestamp()
          Set latest tag report time stamp.
 void setTagreadState(java.lang.Boolean tagreadStarted)
          Sets the tagread state value.
protected  void singleBenchmarkRun(long duration, long delay)
          Single benchmark run with the specified duration and delay parameters.
 boolean startBenchmarkRuns(int cycles, long duration, long delay)
          Start benchmark runs with the specified cycles, duration and delay parameters and return the boolean result.
 void stopBenchmarkRuns()
          Stop benchmark runs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RfidInventoryBenchmarkReader

public RfidInventoryBenchmarkReader(java.lang.String prefix,
                                    NotificationService notificationService)
Constructs an instance of this class from the specified prefix and notification service parameters.

Parameters:
prefix - The prefix (String) parameter.
notificationService - The notification service (NotificationService) parameter.
Method Detail

benchmarkReportReceived

protected void benchmarkReportReceived(java.util.Map benchmarkReport)
Benchmark report received with the specified benchmark report parameter.

Parameters:
benchmarkReport - The benchmark report (Map) parameter.

clearBenchmarkReports

public void clearBenchmarkReports()
Clear benchmark reports.

Specified by:
clearBenchmarkReports in interface IRfidInventoryBenchmarkReader
See Also:
getBenchmarkReports()

controlTagRead

protected void controlTagRead(java.lang.Boolean state)
Control tag read with the specified state parameter.

Parameters:
state - The state (Boolean) parameter.

displayBenchmarkDetailReports

public void displayBenchmarkDetailReports(DeviceServletContext context,
                                          int serialNum)
Display benchmark detail reports with the specified context and serial num parameters.

Specified by:
displayBenchmarkDetailReports in interface IRfidInventoryBenchmarkReader
Parameters:
context - The context (DeviceServletContext) parameter.
serialNum - The serial num (int) parameter.
See Also:
getBenchmarkDetailReports(int)

getBenchmarkDetailReportStrin

public java.lang.String getBenchmarkDetailReportStrin(int serialNum)
Get benchmark detail report strin with the specified serial num parameter and return the String result.

Parameters:
serialNum - The serial num (int) parameter.
Returns:
Results of the get benchmark detail report strin (String) value.

getBenchmarkDetailReports

public java.util.List getBenchmarkDetailReports(int serialNum)
Get benchmark detail reports with the specified serial num parameter and return the List result.

Specified by:
getBenchmarkDetailReports in interface IRfidInventoryBenchmarkReader
Parameters:
serialNum - The serial num (int) parameter.
Returns:
Results of the get benchmark detail reports (List) value.
See Also:
displayBenchmarkDetailReports(DeviceServletContext,int)

getBenchmarkReport_ajax

public void getBenchmarkReport_ajax(DeviceServletContext context)
Get benchmark report_ajax with the specified context parameter.

Specified by:
getBenchmarkReport_ajax in interface IRfidInventoryBenchmarkReader
Parameters:
context - The context (DeviceServletContext) parameter.

getBenchmarkReports

public java.util.List getBenchmarkReports()
Gets the benchmark reports (List) value.

Specified by:
getBenchmarkReports in interface IRfidInventoryBenchmarkReader
Returns:
The benchmark reports (List) value.
See Also:
clearBenchmarkReports()

getControlBitsMap

protected java.util.Map getControlBitsMap(java.lang.String bit,
                                          java.lang.Boolean state)
Get control bits map with the specified bit and state parameters and return the Map result.

Parameters:
bit - The bit (String) parameter.
state - The state (Boolean) parameter.
Returns:
Results of the get control bits map (Map) value.

getCurrentRunFinishedCycles

public int getCurrentRunFinishedCycles()
Gets the current run finished cycles (int) value.

Returns:
The current run finished cycles (int) value.
See Also:
setCurrentRunFinishedCycles(int)

getCurrentRunTotalCycle

public int getCurrentRunTotalCycle()
Gets the current run total cycle (int) value.

Returns:
The current run total cycle (int) value.
See Also:
setCurrentRunTotalCycle(int)

getLatestTagReportTimestamp

public java.lang.String getLatestTagReportTimestamp()
Gets the latest tag report time stamp (String) value.

Returns:
The latest tag report time stamp (String) value.
See Also:
setLatestTagReportTimestamp()

getNotificationService

public NotificationService getNotificationService()
Gets the notification service value.

Returns:
The notification service (NotificationService) value.

getPrefix

public java.lang.String getPrefix()
Gets the prefix (String) value.

Specified by:
getPrefix in interface IRfidInventoryBenchmarkReader
Returns:
The prefix (String) value.

isBenchmarkEnabled

public boolean isBenchmarkEnabled()
Gets the benchmark enabled (boolean) value.

Specified by:
isBenchmarkEnabled in interface IRfidInventoryBenchmarkReader
Returns:
The benchmark enabled (boolean) value.

isBenchmarkRunStopped

protected boolean isBenchmarkRunStopped()
Gets the benchmark run stopped (boolean) value.

Returns:
The benchmark run stopped (boolean) value.
See Also:
setBenchmarkRunStopped(boolean)

isTagreadStarted

public boolean isTagreadStarted()
Gets the tagread started (boolean) value.

Specified by:
isTagreadStarted in interface IRfidInventoryBenchmarkReader
Returns:
The tagread started (boolean) value.

notificationReceived

public void notificationReceived(java.lang.String externalKey,
                                 java.util.Dictionary data)
Notification received with the specified external key and data parameters.

Parameters:
externalKey - The external key (String) parameter.
data - The data (Dictionary) parameter.
See Also:
benchmarkReportReceived(Map)

sendRequest

protected void sendRequest(java.lang.String topic,
                           java.lang.Object request)
Send request with the specified topic and request parameters.

Parameters:
topic - The topic (String) parameter.
request - The request (Object) parameter.

setBenchmarkRunStopped

protected void setBenchmarkRunStopped(boolean benchmarkRunStopped)
Sets the benchmark run stopped value.

Parameters:
benchmarkRunStopped - The benchmark run stopped (boolean) parameter.
See Also:
isBenchmarkRunStopped()

setBenchmarkState

public void setBenchmarkState(java.lang.Boolean benchmarkEnabled)
Sets the benchmark state value.

Parameters:
benchmarkEnabled - The benchmark enabled (Boolean) parameter.

setBenchmarking

public void setBenchmarking(boolean state)
Sets the benchmarking value.

Specified by:
setBenchmarking in interface IRfidInventoryBenchmarkReader
Parameters:
state - The state (boolean) parameter.

setCurrentRunFinishedCycles

public void setCurrentRunFinishedCycles(int currentRunFinishedCycles)
Sets the current run finished cycles value.

Parameters:
currentRunFinishedCycles - The current run finished cycles (int) parameter.
See Also:
getCurrentRunFinishedCycles()

setCurrentRunTotalCycle

public void setCurrentRunTotalCycle(int currentRunTotalCycle)
Sets the current run total cycle value.

Parameters:
currentRunTotalCycle - The current run total cycle (int) parameter.
See Also:
getCurrentRunTotalCycle()

setLatestTagReportTimestamp

public void setLatestTagReportTimestamp()
Set latest tag report time stamp.

See Also:
getLatestTagReportTimestamp()

setTagreadState

public void setTagreadState(java.lang.Boolean tagreadStarted)
Sets the tagread state value.

Parameters:
tagreadStarted - The tagread started (Boolean) parameter.

singleBenchmarkRun

protected void singleBenchmarkRun(long duration,
                                  long delay)
Single benchmark run with the specified duration and delay parameters.

Parameters:
duration - The duration (long) parameter.
delay - The delay (long) parameter.

startBenchmarkRuns

public boolean startBenchmarkRuns(int cycles,
                                  long duration,
                                  long delay)
Start benchmark runs with the specified cycles, duration and delay parameters and return the boolean result.

Specified by:
startBenchmarkRuns in interface IRfidInventoryBenchmarkReader
Parameters:
cycles - The cycles (int) parameter.
duration - The duration (long) parameter.
delay - The delay (long) parameter.
Returns:
Results of the start benchmark runs (boolean) value.
See Also:
stopBenchmarkRuns()

stopBenchmarkRuns

public void stopBenchmarkRuns()
Stop benchmark runs.

Specified by:
stopBenchmarkRuns in interface IRfidInventoryBenchmarkReader
See Also:
startBenchmarkRuns(int,long,long)

2010-01-26 1.2.0

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