Author: jfrederic.clere(a)jboss.com
Date: 2009-09-08 12:24:57 -0400 (Tue, 08 Sep 2009)
New Revision: 1163
Modified:
branches/2.1.x/java/org/jboss/web/cluster/ClusterListener.java
Log:
A the PING/PING_RSP logic.
Modified: branches/2.1.x/java/org/jboss/web/cluster/ClusterListener.java
===================================================================
--- branches/2.1.x/java/org/jboss/web/cluster/ClusterListener.java 2009-09-04 10:37:30 UTC
(rev 1162)
+++ branches/2.1.x/java/org/jboss/web/cluster/ClusterListener.java 2009-09-08 16:24:57 UTC
(rev 1163)
@@ -687,8 +687,29 @@
}
return result.toString();
}
+
+ /**
+ * Check the node connectivity with the proxies.
+ *
+ *
+ * @return the status of the node or the proxy.
+ */
+ public String doProxyPing(String JvmRoute) {
+ HashMap<String, String> parameters = new HashMap<String, String>();
+ if (JvmRoute != null)
+ parameters.put("JVMRoute", JvmRoute);
+ // Send PING * request
+ Proxy[] local = proxies;
+ StringBuffer result = new StringBuffer();
+ for (int i = 0; i < local.length; i++) {
+ result.append("Proxy[").append(i).append("]:
[").append(local[i].address)
+ .append(':').append(local[i].port).append("]:
\r\n");
+ result.append(sendRequest("PING", true, parameters, i));
+ result.append("\r\n");
+ }
+ return result.toString();
+ }
-
/**
* Reset a DOWN connection to the proxy up to ERROR, where the configuration will
* be refreshed. To be used through JMX or similar.
Show replies by date