From d08cbf6b8705df234077c49608de3c2f7ff0e3fa Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Thu, 21 Nov 2019 18:35:14 -0500 Subject: [Update] Codebase updated to 0.2.8 ~ Rewrote files and documentation for cohesion ~ Removed I from the start of interface names --- src/main/java/net/transit/network/system/Node.java | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 src/main/java/net/transit/network/system/Node.java (limited to 'src/main/java/net/transit/network/system/Node.java') diff --git a/src/main/java/net/transit/network/system/Node.java b/src/main/java/net/transit/network/system/Node.java new file mode 100644 index 0000000..8e0fcbb --- /dev/null +++ b/src/main/java/net/transit/network/system/Node.java @@ -0,0 +1,50 @@ +package net.transit.network.system; + +import net.transit.network.swap.Acceptor; +import net.transit.network.swap.Provider; + +/** + * @author Kyle Gunger + * @apiNote A node inside or outside a system. Provides acceptors and providers to other nodes. + */ +public interface Node +{ + /**Returns the groupIDs of groups the node provide + * + * @return String[] + */ + public String[] groupsProvided(); + + /**Get the system managing the node or {@code null} if there isn't one + * + * @return ISystem + */ + public System getSystem(); + + /**Returns {@code true} if the node provides Acceptors + * + * @return boolean + */ + public boolean isAcceptor(); + + /**Returns an Acceptor or {@code null} depending on the requester and group + * + * @param requester The object requesting the Acceptor + * @param group + * @return Acceptor + */ + public Acceptor requestAcceptor(Object requester, String group); + + /**Returns {@code true} if the node provides Providers + * + */ + public boolean isProvider(); + + /**Returns an Provider or {@code null} depending on the requester and group + * + * @param requester The object requesting the Provider + * @param group + * @return Provider + */ + public Provider requestProvider(Object requestor, String group); +} -- cgit v1.2.3