Author: sebb
Date: Fri Sep 16 16:41:59 2011
New Revision: 1171656
URL: http://svn.apache.org/viewvc?rev=1171656&view=rev
Log:
It's confusing to use the same interface method names for JMeterEngine and
RemoteJMeterEngine,
so prefix the remote interface method names with "r".
This also makes it easier to trace the method calls in an IDE.
Modified:
jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/ClientJMeterEngine.java
jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/RemoteJMeterEngine.java
jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/RemoteJMeterEngineImpl.java
Modified:
jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/ClientJMeterEngine.java
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/ClientJMeterEngine.java?rev=1171656&r1=1171655&r2=1171656&view=diff
==============================================================================
---
jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/ClientJMeterEngine.java
(original)
+++
jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/ClientJMeterEngine.java
Fri Sep 16 16:41:59 2011
@@ -81,7 +81,7 @@ public class ClientJMeterEngine implemen
public void stopTest(boolean now) {
log.info("about to "+(now ? "stop" : "shutdown")+" remote test on
"+host);
try {
- remote.stopTest(now);
+ remote.rstopTest(now);
} catch (Exception ex) {
log.error("", ex); // $NON-NLS-1$
}
@@ -91,11 +91,11 @@ public class ClientJMeterEngine implemen
public void reset() {
try {
try {
- remote.reset();
+ remote.rreset();
} catch (java.rmi.ConnectException e) {
log.info("Retry reset after: "+e);
remote = getEngine(host);
- remote.reset();
+ remote.rreset();
}
} catch (Exception ex) {
log.error("Failed to reset remote engine", ex); // $NON-NLS-1$
@@ -125,18 +125,18 @@ public class ClientJMeterEngine implemen
File baseDirRelative =
FileServer.getFileServer().getBaseDirRelative();
synchronized(LOCK)
{
- remote.configure(testTree, host, baseDirRelative);
+ remote.rconfigure(testTree, host, baseDirRelative);
}
log.info("sent test to " + host + "
basedir='"+baseDirRelative+"'"); // $NON-NLS-1$
if (savep != null){
log.info("Sending properties "+savep);
try {
- remote.setProperties(savep);
+ remote.rsetProperties(savep);
} catch (RemoteException e) {
log.warn("Could not set properties: " + e.toString());
}
}
- remote.runTest();
+ remote.rrunTest();
log.info("sent run command to "+ host);
} catch (IllegalStateException ex) {
log.error("Error in run() method "+ex); // $NON-NLS-1$
@@ -166,10 +166,11 @@ public class ClientJMeterEngine implemen
}
/** {@inheritDoc} */
+ // Called by JMeter ListenToTest if remoteStop is true
public void exit() {
log.info("about to exit remote server on "+host);
try {
- remote.exit();
+ remote.rexit();
} catch (RemoteException e) {
log.warn("Could not perform remote exit: " + e.toString());
}
Modified:
jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/RemoteJMeterEngine.java
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/RemoteJMeterEngine.java?rev=1171656&r1=1171655&r2=1171656&view=diff
==============================================================================
---
jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/RemoteJMeterEngine.java
(original)
+++
jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/RemoteJMeterEngine.java
Fri Sep 16 16:41:59 2011
@@ -26,15 +26,15 @@ import java.util.Properties;
import org.apache.jorphan.collections.HashTree;
public interface RemoteJMeterEngine extends Remote {
- void configure(HashTree testTree, String host, File jmxBase) throws
RemoteException;
+ void rconfigure(HashTree testTree, String host, File jmxBase) throws
RemoteException;
- void runTest() throws RemoteException, JMeterEngineException;
+ void rrunTest() throws RemoteException, JMeterEngineException;
- void stopTest(boolean now) throws RemoteException;
+ void rstopTest(boolean now) throws RemoteException;
- void reset() throws RemoteException;
+ void rreset() throws RemoteException;
- void setProperties(Properties p) throws RemoteException;
+ void rsetProperties(Properties p) throws RemoteException;
- void exit() throws RemoteException;
+ void rexit() throws RemoteException;
}
Modified:
jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/RemoteJMeterEngineImpl.java
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/RemoteJMeterEngineImpl.java?rev=1171656&r1=1171655&r2=1171656&view=diff
==============================================================================
---
jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/RemoteJMeterEngineImpl.java
(original)
+++
jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/RemoteJMeterEngineImpl.java
Fri Sep 16 16:41:59 2011
@@ -127,7 +127,7 @@ public class RemoteJMeterEngineImpl exte
* @param testTree
* the feature to be added to the ThreadGroup attribute
*/
- public void configure(HashTree testTree, String host, File jmxBase) throws
RemoteException {
+ public void rconfigure(HashTree testTree, String host, File jmxBase)
throws RemoteException {
log.info("Creating JMeter engine on host "+host+" base '"+jmxBase+"'");
synchronized(LOCK) { // close window where another remote client might
jump in
if (backingEngine != null && backingEngine.isActive()) {
@@ -141,13 +141,13 @@ public class RemoteJMeterEngineImpl exte
FileServer.getFileServer().setBase(jmxBase);
}
- public void runTest() throws RemoteException, JMeterEngineException,
IllegalStateException {
+ public void rrunTest() throws RemoteException, JMeterEngineException,
IllegalStateException {
log.info("Running test");
checkOwner("runTest");
backingEngine.runTest();
}
- public void reset() throws RemoteException, IllegalStateException {
+ public void rreset() throws RemoteException, IllegalStateException {
// Mail on userlist reported NPE here - looks like only happens if
there are network errors, but check anyway
if (backingEngine != null) {
log.info("Reset");
@@ -158,7 +158,7 @@ public class RemoteJMeterEngineImpl exte
}
}
- public void stopTest(boolean now) throws RemoteException {
+ public void rstopTest(boolean now) throws RemoteException {
if (now) {
log.info("Stopping test ...");
} else {
@@ -168,7 +168,11 @@ public class RemoteJMeterEngineImpl exte
log.info("... stopped");
}
- public void exit() throws RemoteException {
+ /*
+ * Called by:
+ * - ClientJMeterEngine.exe() which is called on remoteStop
+ */
+ public void rexit() throws RemoteException {
log.info("Exitting");
backingEngine.exit();
// Tidy up any objects we created
@@ -184,7 +188,7 @@ public class RemoteJMeterEngineImpl exte
System.runFinalization();
}
- public void setProperties(Properties p) throws RemoteException,
IllegalStateException {
+ public void rsetProperties(Properties p) throws RemoteException,
IllegalStateException {
checkOwner("setProperties");
backingEngine.setProperties(p);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]