Author: vhalbert(a)redhat.com
Date: 2009-06-11 17:15:48 -0400 (Thu, 11 Jun 2009)
New Revision: 1041
Modified:
trunk/server/src/main/java/com/metamatrix/platform/admin/api/runtime/SystemStateBuilder.java
Log:
Teiid-570 - the ping logic was extracted out to another method so that for testing
purposes, this method could be overridden and still allow the rest of the
SystemStateBuilder class to be used.
Modified:
trunk/server/src/main/java/com/metamatrix/platform/admin/api/runtime/SystemStateBuilder.java
===================================================================
---
trunk/server/src/main/java/com/metamatrix/platform/admin/api/runtime/SystemStateBuilder.java 2009-06-11
17:23:45 UTC (rev 1040)
+++
trunk/server/src/main/java/com/metamatrix/platform/admin/api/runtime/SystemStateBuilder.java 2009-06-11
21:15:48 UTC (rev 1041)
@@ -137,7 +137,7 @@
HostID hostID = new HostID(hostName);
boolean deployed = config.getHostIDs().contains(hostID);
- boolean running = this.hostManagement.ping(hostName);
+ boolean running = isHostRunning(hostName);
return new HostData(hostName, processes, deployed, running,
host.getProperties());
}
@@ -162,9 +162,13 @@
processes.add(createProcessData(deployedComponent));
}
- boolean running = this.hostManagement.ping(hostID.getFullName());
+ boolean running = isHostRunning(hostID.getFullName());
return new HostData(hostID.getFullName(), processes, true, running, new
Properties());
}
+
+ protected boolean isHostRunning(String hostName) {
+ return this.hostManagement.ping(hostName);
+ }
/**
Show replies by date