@HandlerOutput(name="hasLB", type=Boolean.class)}
)
public static void getListOfClusteredInstances(HandlerContext handlerCtx){
String clusterName = (String) handlerCtx.getInputValue("ClusterName");
try{
ClusterConfig clusterConfig = AMXUtil.getDomainConfig().getClusterConfigMap().get(clusterName);
Map<String,ClusteredServerConfig> serverMap = AMXUtil.getDomainConfig().getClusterConfigMap().get(clusterName).getClusteredServerConfigMap();
List result = new ArrayList();
if(serverMap != null) {
for(String key : serverMap.keySet()){
HashMap oneRow = new HashMap();
String serverName = key;
String config = serverMap.get(key).getReferencedConfigName();
String node = serverMap.get(key).getReferencedNodeAgentName();
String weight = serverMap.get(key).getLBWeight();
String state = AMXUtil.getStatusForDisplay(
AMXUtil.getJ2EEDomain().getJ2EEServerMap().get(serverName), true);
oneRow.put("name", serverName);
oneRow.put("selected", false);
oneRow.put("config", (config == null) ? " ": config);
oneRow.put("node", (node == null) ? " ": node);
oneRow.put("weight", (weight == null) ? " ": weight);
oneRow.put("status", (state == null) ? " ": state);
ServerRefConfig serverRef = clusterConfig.getServerRefConfigMap().get(key);
int timeout = serverRef.getDisableTimeoutInMinutes();
oneRow.put("timeout", ""+timeout);
oneRow.put("lbStatus", ""+serverRef.getLBEnabled());
result.add(oneRow);