2010-01-26 1.2.0

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

java.lang.Object
  extended by org.eclipse.soda.dk.rfid.inventory.benchmark.servlet.RfidInventoryBenchmarkServletConsole

public class RfidInventoryBenchmarkServletConsole
extends java.lang.Object

Version:
1.2.0

Constructor Summary
RfidInventoryBenchmarkServletConsole(BundleContext bundleContext, NotificationService notificationService)
          Constructs an instance of this class from the specified bundle context and notification service parameters.
 
Method Summary
protected  void activate()
          Activate.
protected  void addReader(java.lang.String prefix)
          Add reader with the specified prefix parameter.
 void changeBenchmarkState(boolean state)
          Change benchmark state with the specified state parameter.
protected  void clearBenchmarkReports()
          Clear benchmark reports.
 boolean containsPrefix(java.lang.String prefix)
          Contains prefix with the specified prefix parameter and return the boolean result.
 void displayDetailReport(DeviceServletContext context, java.lang.String prefix, int serialNum)
          Display detail report with the specified context, prefix and serial num parameters.
protected  void displayReaderList(DeviceServletContext context)
          Display reader list with the specified context parameter.
protected  void getBenchmarkReport_ajax(DeviceServletContext context)
          Get benchmark report_ajax with the specified context parameter.
 boolean getBenchmarkState()
          Gets the benchmark state (boolean) value.
 java.lang.String getCurrentPrefix()
          Gets the current prefix (String) value.
 NotificationService getNotificationService()
          Gets the notification service value.
protected  java.util.Map getReaderList()
          Gets the reader list (Map) value.
 IServiceDetecter getRfidInventoryBenchmarkServiceDetecter()
          Gets the rfid inventory service detecter (IServiceDetecter) value.
 ServiceDetecterListener getServiceDetecterListener()
          Gets the service detecter listener value.
 boolean isTagreadStarted()
          Gets the tagread started (boolean) value.
 void saveDetailToFile(java.lang.String readerId, int serialNum, java.lang.String fileName, java.lang.String comment, DeviceServletContext context)
          Save detail to file with the specified reader id, serial num, file name, comment and context parameters.
 void saveToFile(java.lang.String fileName, java.lang.String comment, DeviceServletContext context)
          Save to file with the specified file name, comment and context parameters.
 void setCurrentPrefix(java.lang.String prefix)
          Sets the current prefix value.
 void setNotificationService(NotificationService notificationService)
          Sets the notification service value.
protected  boolean startBenchmarkRuns(int cycles, long duration, long delay)
          Start benchmark runs with the specified cycles, duration and delay parameters and return the boolean result.
protected  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

RfidInventoryBenchmarkServletConsole

public RfidInventoryBenchmarkServletConsole(BundleContext bundleContext,
                                            NotificationService notificationService)
Constructs an instance of this class from the specified bundle context and notification service parameters.

Parameters:
bundleContext - The bundle context (BundleContext) parameter.
notificationService - The notification service (NotificationService) parameter.
Method Detail

activate

protected void activate()
Activate.


addReader

protected void addReader(java.lang.String prefix)
Add reader with the specified prefix parameter.

Parameters:
prefix - The prefix (String) parameter.

changeBenchmarkState

public void changeBenchmarkState(boolean state)
Change benchmark state with the specified state parameter.

Parameters:
state - The state (boolean) parameter.
See Also:
getBenchmarkState()

clearBenchmarkReports

protected void clearBenchmarkReports()
Clear benchmark reports.


containsPrefix

public boolean containsPrefix(java.lang.String prefix)
Contains prefix with the specified prefix parameter and return the boolean result.

Parameters:
prefix - The prefix (String) parameter.
Returns:
Results of the contains prefix (boolean) value.
See Also:
getCurrentPrefix(), setCurrentPrefix(String)

displayDetailReport

public void displayDetailReport(DeviceServletContext context,
                                java.lang.String prefix,
                                int serialNum)
Display detail report with the specified context, prefix and serial num parameters.

Parameters:
context - The context (DeviceServletContext) parameter.
prefix - The prefix (String) parameter.
serialNum - The serial num (int) parameter.

displayReaderList

protected void displayReaderList(DeviceServletContext context)
Display reader list with the specified context parameter.

Parameters:
context - The context (DeviceServletContext) parameter.
See Also:
getReaderList()

getBenchmarkReport_ajax

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

Parameters:
context - The context (DeviceServletContext) parameter.

getBenchmarkState

public boolean getBenchmarkState()
Gets the benchmark state (boolean) value.

Returns:
The benchmark state (boolean) value.
See Also:
changeBenchmarkState(boolean)

getCurrentPrefix

public java.lang.String getCurrentPrefix()
Gets the current prefix (String) value.

Returns:
The current prefix (String) value.
See Also:
setCurrentPrefix(String)

getNotificationService

public NotificationService getNotificationService()
Gets the notification service value.

Returns:
The notification service (NotificationService) value.
See Also:
setNotificationService(NotificationService)

getReaderList

protected java.util.Map getReaderList()
Gets the reader list (Map) value.

Returns:
The reader list (Map) value.
See Also:
displayReaderList(DeviceServletContext)

getRfidInventoryBenchmarkServiceDetecter

public IServiceDetecter getRfidInventoryBenchmarkServiceDetecter()
Gets the rfid inventory service detecter (IServiceDetecter) value.

Returns:
The rfid inventory service detecter (IServiceDetecter) value.

getServiceDetecterListener

public ServiceDetecterListener getServiceDetecterListener()
Gets the service detecter listener value.

Returns:
The service detecter listener (ServiceDetecterListener) value.

isTagreadStarted

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

Returns:
The tagread started (boolean) value.

saveDetailToFile

public void saveDetailToFile(java.lang.String readerId,
                             int serialNum,
                             java.lang.String fileName,
                             java.lang.String comment,
                             DeviceServletContext context)
                      throws java.io.IOException
Save detail to file with the specified reader id, serial num, file name, comment and context parameters.

Parameters:
readerId - The reader ID (String) parameter.
serialNum - The serial num (int) parameter.
fileName - The file name (String) parameter.
comment - The comment (String) parameter.
context - The context (DeviceServletContext) parameter.
Throws:
java.io.IOException - IOException.

saveToFile

public void saveToFile(java.lang.String fileName,
                       java.lang.String comment,
                       DeviceServletContext context)
                throws java.io.IOException
Save to file with the specified file name, comment and context parameters.

Parameters:
fileName - The file name (String) parameter.
comment - The comment (String) parameter.
context - The context (DeviceServletContext) parameter.
Throws:
java.io.IOException - IOException.
See Also:
saveDetailToFile(String,int,String,String,DeviceServletContext)

setCurrentPrefix

public void setCurrentPrefix(java.lang.String prefix)
Sets the current prefix value.

Parameters:
prefix - The prefix (String) parameter.
See Also:
getCurrentPrefix()

setNotificationService

public void setNotificationService(NotificationService notificationService)
Sets the notification service value.

Parameters:
notificationService - The notification service (NotificationService) parameter.
See Also:
getNotificationService()

startBenchmarkRuns

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

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

protected void stopBenchmarkRuns()
Stop benchmark runs.

See Also:
startBenchmarkRuns(int,long,long)

2010-01-26 1.2.0

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