com.sun.japex.jdsl.nativecode
Class JapexNativeDriver

java.lang.Object
  extended by com.sun.japex.JapexDriverBase
      extended by com.sun.japex.jdsl.nativecode.JapexNativeDriver
All Implemented Interfaces:
JapexDriver, Params, java.util.concurrent.Callable<java.lang.Object>

public class JapexNativeDriver
extends JapexDriverBase

Author:
Paul.Sandoz@sun.com, Santiago.PericasGeertsen@sun.com

Field Summary
protected  java.lang.Object _userData
           
 
Fields inherited from class com.sun.japex.JapexDriverBase
_driver, _endTime, _needWarmup, _testCase, _testSuite
 
Constructor Summary
JapexNativeDriver()
           
 
Method Summary
 void finish(TestCase testCase)
          Called exactly once after calling run.
 void finish(TestCase testCase, java.lang.Object userData)
           
 void initializeDriver()
          Called once when the class is loaded.
 java.lang.Object initializeDriver(java.lang.Object userData)
           
 void prepare(TestCase testCase)
          Execute prepare phase.
 void prepare(TestCase testCase, java.lang.Object userData)
           
 void run()
          Execute the run phase.
 void run(TestCase testCase)
          Called once or more for every test to obtain perf data.
 void run(TestCase testCase, java.lang.Object userData)
           
 int runLoopDuration(double duration, java.lang.Object userData)
          Called for looping over a specified duration
 void runLoopIterations(int iterations, java.lang.Object userData)
          Called for looping over a specified number iterations TODO: change iterations from int to long
 void setDriver(Driver driver)
           
 void terminateDriver()
          Called after all tests are completed.
 void terminateDriver(java.lang.Object userData)
           
 void warmup(TestCase testCase)
          Called once or more for every test, before calling run.
 void warmup(TestCase testCase, java.lang.Object userData)
           
 
Methods inherited from class com.sun.japex.JapexDriverBase
call, finish, getBooleanParam, getDoubleParam, getIntParam, getLongParam, getParam, getTestSuite, hasParam, prepare, setBooleanParam, setDoubleParam, setEndTime, setIntParam, setLongParam, setParam, setTestCase, setTestSuite, warmup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_userData

protected java.lang.Object _userData
Constructor Detail

JapexNativeDriver

public JapexNativeDriver()
Method Detail

setDriver

public void setDriver(Driver driver)
Overrides:
setDriver in class JapexDriverBase

run

public void run()
Execute the run phase. This method can be executed concurrently by multiple threads. Care should be taken to ensure proper synchronization. Note that parameter getters and setters are already synchronized. This method defers to simple native methods that perform the work of the loop (for time or for iterations).

Overrides:
run in class JapexDriverBase

initializeDriver

public void initializeDriver()
Called once when the class is loaded.

Specified by:
initializeDriver in interface JapexDriver
Overrides:
initializeDriver in class JapexDriverBase

initializeDriver

public java.lang.Object initializeDriver(java.lang.Object userData)

prepare

public void prepare(TestCase testCase)
Execute prepare phase.

Specified by:
prepare in interface JapexDriver
Overrides:
prepare in class JapexDriverBase

prepare

public void prepare(TestCase testCase,
                    java.lang.Object userData)

warmup

public void warmup(TestCase testCase)
Called once or more for every test, before calling run. Default implementation is to call run().

Specified by:
warmup in interface JapexDriver
Overrides:
warmup in class JapexDriverBase

warmup

public void warmup(TestCase testCase,
                   java.lang.Object userData)

run

public void run(TestCase testCase)
Called once or more for every test to obtain perf data.

Specified by:
run in interface JapexDriver
Overrides:
run in class JapexDriverBase

run

public void run(TestCase testCase,
                java.lang.Object userData)

finish

public void finish(TestCase testCase)
Called exactly once after calling run.

Specified by:
finish in interface JapexDriver
Overrides:
finish in class JapexDriverBase

finish

public void finish(TestCase testCase,
                   java.lang.Object userData)

terminateDriver

public void terminateDriver()
Called after all tests are completed.

Specified by:
terminateDriver in interface JapexDriver
Overrides:
terminateDriver in class JapexDriverBase

terminateDriver

public void terminateDriver(java.lang.Object userData)

runLoopDuration

public int runLoopDuration(double duration,
                           java.lang.Object userData)
Called for looping over a specified duration


runLoopIterations

public void runLoopIterations(int iterations,
                              java.lang.Object userData)
Called for looping over a specified number iterations TODO: change iterations from int to long



Copyright © 2011. All Rights Reserved.