summaryrefslogtreecommitdiff
path: root/src/main/java/net/transit/network/swap/Provider.java
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2019-11-22 10:35:21 -0500
committerKyle Gunger <kgunger12@gmail.com>2019-11-22 10:35:21 -0500
commitc05689ba385733ee52ca825b194134126640af8a (patch)
tree66674f5af72f9bfa97e8ee377f4e894f8fca9a72 /src/main/java/net/transit/network/swap/Provider.java
parentd08cbf6b8705df234077c49608de3c2f7ff0e3fa (diff)
[Update] Nodes now transfer things
~ Switched Provider and Acceptor to ProviderNode and AcceptorNode ~ Nodes are now expected to connect to eachother on their own ~ Inventory hooks are not here, but have been thought through Signed-off-by: Kyle Gunger <kgunger12@gmail.com>
Diffstat (limited to 'src/main/java/net/transit/network/swap/Provider.java')
-rw-r--r--src/main/java/net/transit/network/swap/Provider.java50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/main/java/net/transit/network/swap/Provider.java b/src/main/java/net/transit/network/swap/Provider.java
deleted file mode 100644
index 20656b8..0000000
--- a/src/main/java/net/transit/network/swap/Provider.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package net.transit.network.swap;
-
-import net.transit.network.packet.Packet;
-import net.transit.network.system.Node;
-
-/**
- * @author Kyle Gunger
- *
- * @param <T> The type of data provided (in IPacket<<T>> form)
- */
-public interface Provider<T>
-{
- /** Returns the INode this Provider is attached to. All Acceptors and Providers must be attached to an INode to function.
- *
- * @return INode
- */
- public Node getNode();
-
- /**
- * @return <b>True</b> if the Provider can provide a packet.
- */
- public boolean canProvide();
-
- /**Get the next packet from the Provider
- *
- * @return IPacket<<T>>
- */
- public Packet<T> provide();
-
- /**Retain the packet if the Acceptor did not accept the packet.
- *
- * @param rejected The rejected packet
- */
- public void retain(Packet<T> rejected);
-
- /**
- * @return <b>True</b> if the Provider has an Acceptor assigned to it
- */
- public boolean hasAcceptor();
-
- /**Set the Acceptor of the Provider. The Provider can decide if it wants to adopt the Acceptor.
- */
- public void setAcceptor(Acceptor<T> acceptor);
-
- /** Request that the Provider close it's connection to a Acceptor. The Provider may also shut itself down if no more Acceptors are attached.
- *
- * @param acceptor The Acceptor
- */
- public void shutdown(Acceptor<T> acceptor);
-} \ No newline at end of file