diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2023-11-18 14:30:50 -0500 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2023-11-18 14:30:50 -0500 |
commit | 0d147b3a184fc311bd3dae6bf1c974722753b3bf (patch) | |
tree | 33d3ef5f8b37831f4704613e98f76a5f11f1f3d4 /src/main/java/net/cshift/api/transit/network/INode.java | |
parent | 5c5e1b3dd0985986a941a65726f8f2d7bff7a188 (diff) |
Diffstat (limited to 'src/main/java/net/cshift/api/transit/network/INode.java')
-rw-r--r-- | src/main/java/net/cshift/api/transit/network/INode.java | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/src/main/java/net/cshift/api/transit/network/INode.java b/src/main/java/net/cshift/api/transit/network/INode.java deleted file mode 100644 index ad9f1d3..0000000 --- a/src/main/java/net/cshift/api/transit/network/INode.java +++ /dev/null @@ -1,74 +0,0 @@ -package net.cshift.api.transit.network; - -import net.cshift.api.transit.network.packet.*; - -/** - * @author Kyle Gunger - * @apiNote A node inside or outside a system. - */ -public interface INode -{ - /** Returns a pool manifest for the INode - * - */ - public PoolManifest getManifest(); - - - - // ############### - // # Connections # - // ############### - - /** Call this function to establish a specific connection with a node. - * - * @param <T> The type of connection being asked for - * @param poolID The ID of the pool the channel will interface with (see PoolManifest) - * @param asker The asking node - * @return A channel if the node accepts the request, {@code null} otherwise - */ - public <T> Channel<T> connect(int poolID, String group, INode asker); - - /** Call this function to establish a default connection with a node. - * - * @param <T> The type of connection being asked for - * @param group The group that is being connected to - * @param asker The asking node - * @return A channel if the node accepts the request, {@code null} otherwise - */ - public <T> Channel<T> connectDefault(String group, INode asker); - - /** Accept a packet from a channel (or not). - * - * @apiNote Do not call this function, use Channel.send(packet) instead. - * @param <T> The type of the packet and channel - * @param packet The packet to be vetted - * @param channel The channel which the packet is coming through - * @return The overflow data if the packet is only partially accepted. {@code null} otherwise. - */ - public <T> IStaticPacket<T> accept(IStaticPacket<T> packet, Channel<T> channel); - - /** Pressure - * - * @apiNote Do not call this function, use Channel.pressure() instead. - * @param channel The channel asking for the pressure - * @return A Number representing the pressure from the channel (in base group units). - */ - public <T> Number getPressure(Channel<T> channel); - - /** Transfer rate - * - * @apiNote Do not call this function, use Channel.rate() instead. - * @param channel The channel asking for the transfer rate - * @return A Number representing the transfer rate from the channel (in base group units per tick). - */ - public <T> Number getRate(Channel<T> channel); - - /** Called when a channel is terminated - * - * @apiNote Do not call this function, use Channel.terminate() instead. - * @param <T> The type of the channel - * @param channel The channel being terminated - */ - public <T> void onTerminate(Channel<T> channel); - -} |