summaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/net/transit/network/system/Node.java6
-rw-r--r--src/main/java/net/transit/network/system/swap/AcceptorNode.java10
-rw-r--r--src/main/java/net/transit/network/system/swap/ProviderNode.java9
3 files changed, 24 insertions, 1 deletions
diff --git a/src/main/java/net/transit/network/system/Node.java b/src/main/java/net/transit/network/system/Node.java
index 9e9ac10..9ab9812 100644
--- a/src/main/java/net/transit/network/system/Node.java
+++ b/src/main/java/net/transit/network/system/Node.java
@@ -27,4 +27,10 @@ public interface Node
* @return
*/
public Object getData(String groupID);
+
+ /** Get the nodes that this node is connected to
+ *
+ * @return Node[]
+ */
+ public Node[] getConnections();
}
diff --git a/src/main/java/net/transit/network/system/swap/AcceptorNode.java b/src/main/java/net/transit/network/system/swap/AcceptorNode.java
index c583146..69c07e7 100644
--- a/src/main/java/net/transit/network/system/swap/AcceptorNode.java
+++ b/src/main/java/net/transit/network/system/swap/AcceptorNode.java
@@ -10,11 +10,19 @@ public interface AcceptorNode extends Node
*
* @param requester The object to be a provider
* @param group
- * @return Provider
+ * @return
*/
public boolean linkProvider(Node requestor, String group);
+ /** Unlink a provider from the acceptor
+ *
+ * @param toUnlink
+ * @return
+ */
+ public boolean unlinkProvider(Node toUnlink);
+
+
/**
* @return Node[]
*/
diff --git a/src/main/java/net/transit/network/system/swap/ProviderNode.java b/src/main/java/net/transit/network/system/swap/ProviderNode.java
index 4cd9dba..1ba1ef3 100644
--- a/src/main/java/net/transit/network/system/swap/ProviderNode.java
+++ b/src/main/java/net/transit/network/system/swap/ProviderNode.java
@@ -12,6 +12,15 @@ public interface ProviderNode extends Node{
*/
public boolean linkAcceptor(Node requester, String group);
+
+ /** Unlink a provider from the acceptor
+ *
+ * @param toUnlink
+ * @return
+ */
+ public boolean unlinkAcceptor(Node toUnlink);
+
+
/**
* @return Node[]
*/