Package org.drasyl.handler.remote
Class PeersManager
java.lang.Object
org.drasyl.handler.remote.PeersManager
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
acknowledgementMessageReceived
(DrasylAddress peerKey, PeersManager.PathId id, int rtt) boolean
addChildrenPath
(io.netty.channel.ChannelHandlerContext ctx, DrasylAddress peerKey, PeersManager.PathId id, InetSocketAddress endpoint) boolean
addChildrenPath
(io.netty.channel.ChannelHandlerContext ctx, DrasylAddress peerKey, PeersManager.PathId id, InetSocketAddress endpoint, int rtt) boolean
addSuperPeerPath
(io.netty.channel.ChannelHandlerContext ctx, DrasylAddress peerKey, PeersManager.PathId id, InetSocketAddress endpoint, int rtt) void
applicationMessageReceived
(DrasylAddress peerKey) void
applicationMessageSent
(DrasylAddress peerKey) boolean
hasApplicationTraffic
(io.netty.channel.ChannelHandlerContext ctx, DrasylAddress peerKey) boolean
boolean
boolean
hasPath
(DrasylAddress peerKey) boolean
hasPath
(DrasylAddress peerKey, PeersManager.PathId id) void
helloMessageReceived
(DrasylAddress peerKey, PeersManager.PathId id) void
helloMessageSent
(DrasylAddress peerKey, PeersManager.PathId id) boolean
isReachable
(io.netty.channel.ChannelHandlerContext ctx, DrasylAddress peerKey, PeersManager.PathId id) boolean
isStale
(io.netty.channel.ChannelHandlerContext ctx, DrasylAddress peerKey, PeersManager.PathId id) boolean
removeChildrenPath
(io.netty.channel.ChannelHandlerContext ctx, DrasylAddress peerKey, PeersManager.PathId id) void
removeChildrenPaths
(io.netty.channel.ChannelHandlerContext ctx, PeersManager.PathId id) boolean
removeSuperPeerPath
(io.netty.channel.ChannelHandlerContext ctx, DrasylAddress peerKey, PeersManager.PathId id) void
removeSuperPeerPaths
(io.netty.channel.ChannelHandlerContext ctx, PeersManager.PathId id) resolve
(DrasylAddress peerKey) resolveInetAddress
(DrasylAddress peerKey, PeersManager.PathId id) int
rtt
(DrasylAddress peerKey, PeersManager.PathId id) setDefaultPeer
(DrasylAddress newDefaultPeerKey) setDefaultPeerIfUnset
(DrasylAddress newDefaultPeerKey) toString()
boolean
tryAddChildrenPath
(io.netty.channel.ChannelHandlerContext ctx, DrasylAddress peerKey, PeersManager.PathId id, InetSocketAddress endpoint)
-
Constructor Details
-
PeersManager
public PeersManager()
-
-
Method Details
-
toString
-
hasApplicationTraffic
public boolean hasApplicationTraffic(io.netty.channel.ChannelHandlerContext ctx, DrasylAddress peerKey) -
applicationMessageSent
-
applicationMessageReceived
-
resolve
-
hasPath
-
hasPath
-
hasPath
-
hasDefaultPeer
public boolean hasDefaultPeer() -
setDefaultPeer
- Throws:
NullPointerException
- ifnewDefaultPeerKey
isnull
-
setDefaultPeerIfUnset
-
unsetDefaultPeer
-
addSuperPeerPath
public boolean addSuperPeerPath(io.netty.channel.ChannelHandlerContext ctx, DrasylAddress peerKey, PeersManager.PathId id, InetSocketAddress endpoint, int rtt) -
removeSuperPeerPath
public boolean removeSuperPeerPath(io.netty.channel.ChannelHandlerContext ctx, DrasylAddress peerKey, PeersManager.PathId id) -
removeSuperPeerPaths
public void removeSuperPeerPaths(io.netty.channel.ChannelHandlerContext ctx, PeersManager.PathId id) -
addChildrenPath
public boolean addChildrenPath(io.netty.channel.ChannelHandlerContext ctx, DrasylAddress peerKey, PeersManager.PathId id, InetSocketAddress endpoint, int rtt) -
addChildrenPath
public boolean addChildrenPath(io.netty.channel.ChannelHandlerContext ctx, DrasylAddress peerKey, PeersManager.PathId id, InetSocketAddress endpoint) -
tryAddChildrenPath
public boolean tryAddChildrenPath(io.netty.channel.ChannelHandlerContext ctx, DrasylAddress peerKey, PeersManager.PathId id, InetSocketAddress endpoint) -
removeChildrenPath
public boolean removeChildrenPath(io.netty.channel.ChannelHandlerContext ctx, DrasylAddress peerKey, PeersManager.PathId id) -
removeChildrenPaths
-
getPeers
-
isStale
public boolean isStale(io.netty.channel.ChannelHandlerContext ctx, DrasylAddress peerKey, PeersManager.PathId id) -
isReachable
public boolean isReachable(io.netty.channel.ChannelHandlerContext ctx, DrasylAddress peerKey, PeersManager.PathId id) -
helloMessageReceived
-
helloMessageSent
-
acknowledgementMessageReceived
-
acknowledgementMessageReceived
-
rtt
-
resolveInetAddress
-