private final Object syncObject = new Object();
/** Node listener support. */
- private final NodeListenerSupport nodeListenerSupport = new NodeListenerSupport();
+ private final NodeListenerSupport nodeListenerManager = new NodeListenerSupport();
/** All nodes. */
private final List<Node> nodes = Collections.synchronizedList(new ArrayList<Node>());
* The listener to add
*/
public void addNodeListener(NodeListener nodeListener) {
- nodeListenerSupport.addListener(nodeListener);
+ nodeListenerManager.addListener(nodeListener);
}
/**
* The listener to remove
*/
public void removeNodeListener(NodeListener nodeListener) {
- nodeListenerSupport.removeListener(nodeListener);
+ nodeListenerManager.removeListener(nodeListener);
}
//
node.addPropertyChangeListener(this);
nodes.add(node);
idNodes.put(node.getId(), node);
- nodeListenerSupport.fireNodeAdded(node);
+ nodeListenerManager.fireNodeAdded(node);
return true;
}
nodes.remove(node);
idNodes.remove(node.getId());
node.removePropertyChangeListener(this);
- nodeListenerSupport.fireNodeRemoved(node);
+ nodeListenerManager.fireNodeRemoved(node);
}
}
FcpClient fcpClient = new FcpClient(clientName, node.getHostname(), node.getPort());
fcpClient.connect();
nodeClients.put(node, fcpClient);
- nodeListenerSupport.fireNodeConnected(node);
+ nodeListenerManager.fireNodeConnected(node);
} catch (UnknownHostException uhe1) {
- nodeListenerSupport.fireNodeConnectionFailed(node, uhe1);
+ nodeListenerManager.fireNodeConnectionFailed(node, uhe1);
} catch (IOException ioe1) {
- nodeListenerSupport.fireNodeConnectionFailed(node, ioe1);
+ nodeListenerManager.fireNodeConnectionFailed(node, ioe1);
} catch (FcpException fe1) {
- nodeListenerSupport.fireNodeConnectionFailed(node, fe1);
+ nodeListenerManager.fireNodeConnectionFailed(node, fe1);
}
}
return;
}
fcpClient.disconnect();
- nodeListenerSupport.fireNodeDisconnected(node, null);
+ nodeListenerManager.fireNodeDisconnected(node, null);
}
/**