Author: jfrederic.clere(a)jboss.com
Date: 2008-03-26 07:44:29 -0400 (Wed, 26 Mar 2008)
New Revision: 1461
Modified:
sandbox/httpd/src/java/TestHttpClient.java
Log:
Add test for the application commands.
Modified: sandbox/httpd/src/java/TestHttpClient.java
===================================================================
--- sandbox/httpd/src/java/TestHttpClient.java 2008-03-26 11:36:55 UTC (rev 1460)
+++ sandbox/httpd/src/java/TestHttpClient.java 2008-03-26 11:44:29 UTC (rev 1461)
@@ -28,11 +28,26 @@
HttpClient httpClient = new HttpClient();
PostMethod pm = null;
- if (command.compareToIgnoreCase("DISABLE")==0) {
+ if (command.compareToIgnoreCase("ENABLE")==0) {
+ pm = (PostMethod) new EnableMethod(URL);
+ pm.addParameter("JVMRoute","node1");
+ pm.addParameter("context", "/myapp");
+ }
+ else if (command.compareToIgnoreCase("DISABLE")==0) {
pm = (PostMethod) new DisableMethod(URL);
pm.addParameter("JVMRoute","node1");
- pm.addParameter("context", "/hisapp");
+ pm.addParameter("context", "/myapp");
}
+ else if (command.compareToIgnoreCase("STOP")==0) {
+ pm = (PostMethod) new StopMethod(URL);
+ pm.addParameter("JVMRoute","node1");
+ pm.addParameter("context", "/myapp");
+ }
+ else if (command.compareToIgnoreCase("REMOVE")==0) {
+ pm = (PostMethod) new RemoveMethod(URL);
+ pm.addParameter("JVMRoute","node1");
+ pm.addParameter("context", "/myapp");
+ }
else if (command.compareToIgnoreCase("CONFIG")==0) {
pm = (PostMethod) new ConfigMethod(URL);
pm.addParameter("JVMRoute","node1");
@@ -40,7 +55,7 @@
pm.addParameter("Host", "jfcpc");
pm.addParameter("Port", "8009");
pm.addParameter("Type", "ajp");
- pm.addParameter("Context", "/hisapp,/myapp");
+ pm.addParameter("Context", "/hisapp,/ourapp");
}
else if (command.compareToIgnoreCase("DUMP")==0) {
pm = (PostMethod) new DumpMethod(URL);
Show replies by date