add flag for a node on the same machine as jSite
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 9 Mar 2008 21:05:23 +0000 (21:05 +0000)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 9 Mar 2008 21:05:23 +0000 (21:05 +0000)
git-svn-id: http://trooper/svn/projects/jSite/trunk@550 c3eda9e8-030b-0410-8277-bc7414b0a119

src/net/pterodactylus/jsite/core/Node.java

index 3766498..e0d61f7 100644 (file)
@@ -36,6 +36,9 @@ public class Node {
        /** The port number of the node. */
        private int port;
 
+       /** Whether the node is running on the same machine as jSite. */
+       private boolean sameMachine;
+
        /**
         * Returns the user-given name of the node.
         * 
@@ -93,4 +96,25 @@ public class Node {
                this.port = port;
        }
 
+       /**
+        * Returns whether this node is running on the same machine as jSite.
+        * 
+        * @return the sameMachine <code>true</code> if, and only if, the node is
+        *         running on the same machine as jSite
+        */
+       boolean isSameMachine() {
+               return sameMachine;
+       }
+
+       /**
+        * Sets whether this node is running on the same machine as jSite.
+        * 
+        * @param sameMachine
+        *            <code>true</code> if the node is running on the same machine
+        *            as jSite, <code>false</code> otherwise
+        */
+       void setSameMachine(boolean sameMachine) {
+               this.sameMachine = sameMachine;
+       }
+
 }