Rename node listener manager.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 22 May 2009 05:07:45 +0000 (07:07 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 22 May 2009 05:07:45 +0000 (07:07 +0200)
src/net/pterodactylus/jsite/core/NodeManager.java

index 2ab728f..7fd4cc9 100644 (file)
@@ -67,7 +67,7 @@ public class NodeManager implements Iterable<Node>, PropertyChangeListener {
        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>());
@@ -105,7 +105,7 @@ public class NodeManager implements Iterable<Node>, PropertyChangeListener {
         *            The listener to add
         */
        public void addNodeListener(NodeListener nodeListener) {
-               nodeListenerSupport.addListener(nodeListener);
+               nodeListenerManager.addListener(nodeListener);
        }
 
        /**
@@ -115,7 +115,7 @@ public class NodeManager implements Iterable<Node>, PropertyChangeListener {
         *            The listener to remove
         */
        public void removeNodeListener(NodeListener nodeListener) {
-               nodeListenerSupport.removeListener(nodeListener);
+               nodeListenerManager.removeListener(nodeListener);
        }
 
        //
@@ -285,7 +285,7 @@ public class NodeManager implements Iterable<Node>, PropertyChangeListener {
                node.addPropertyChangeListener(this);
                nodes.add(node);
                idNodes.put(node.getId(), node);
-               nodeListenerSupport.fireNodeAdded(node);
+               nodeListenerManager.fireNodeAdded(node);
                return true;
        }
 
@@ -305,7 +305,7 @@ public class NodeManager implements Iterable<Node>, PropertyChangeListener {
                        nodes.remove(node);
                        idNodes.remove(node.getId());
                        node.removePropertyChangeListener(this);
-                       nodeListenerSupport.fireNodeRemoved(node);
+                       nodeListenerManager.fireNodeRemoved(node);
                }
        }
 
@@ -325,13 +325,13 @@ public class NodeManager implements Iterable<Node>, PropertyChangeListener {
                        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);
                }
        }
 
@@ -353,7 +353,7 @@ public class NodeManager implements Iterable<Node>, PropertyChangeListener {
                        return;
                }
                fcpClient.disconnect();
-               nodeListenerSupport.fireNodeDisconnected(node, null);
+               nodeListenerManager.fireNodeDisconnected(node, null);
        }
 
        /**