Module org.refcodes.p2p
Package org.refcodes.p2p
package org.refcodes.p2p
-
ClassDescriptionBase exception for peer ID related exceptions.AbstractP2PHeader<LOCATOR>Abstract implementation of a
P2PHeader
.AbstractP2PMessage<LOCATOR,HEADER extends P2PHeader<LOCATOR>, BODY, TAIL extends P2PTail<LOCATOR>> Abstract implementation of aP2PMessage
.AbstractP2PTail<LOCATOR>Abstract implementation of aP2PTail
.AbstractPeer<LOCATOR,HEADER extends P2PHeader<LOCATOR>, TAIL extends P2PTail<LOCATOR>, MSG extends P2PMessage<LOCATOR, HEADER, ?, TAIL>, CONSUMER extends P2PMessageConsumer<MSG, PEER>, PEER extends Peer<LOCATOR, HEADER, TAIL, MSG, ROUTER>, ROUTER extends PeerRouter<LOCATOR, HEADER, TAIL, MSG>> TheAbstractPeer
class implements thePeer
interface and is a concrete implementation of a physical Peer.Provides an accessor for a hop count property.Provides a builder method for a hop count property returning the builder for applying multiple build operations.Provides a mutator for a hop count property.Provides a hop count property.HopsAccessor<LOCATOR>Provides an accessor for a hops property.HopsAccessor.HopsBuilder<LOCATOR,B extends HopsAccessor.HopsBuilder<LOCATOR, B>> Provides a builder method for a hops property returning the builder for applying multiple build operations.HopsAccessor.HopsMutator<LOCATOR>Provides a mutator for a hops property.HopsAccessor.HopsProperty<LOCATOR>Provides a hops property.Thrown in case there is none such peer.Base exception for this package.P2PHeader<LOCATOR>TheP2PHeader
defines the static attributes addressed for the target of theP2PMessage
(a header might be signed as it is not modified during dispatch).P2PMessage<LOCATOR,HEADER extends P2PHeader<LOCATOR>, BODY, TAIL extends P2PTail<LOCATOR>> AP2PMessage
is a transient passing various peers till reaching its target, consisting of a target, a payload and a trail of visited (peer) nodes.A message consumer is a functional interfaces consuming messages.P2PTail<LOCATOR>TheP2PTail
describes the dynamic attributes required during dispatch of aP2PMessage
(a tail is modified during dispatch by having the visited hops appended).Peer<LOCATOR,HEADER extends P2PHeader<LOCATOR>, TAIL extends P2PTail<LOCATOR>, MSG extends P2PMessage<LOCATOR, HEADER, ?, TAIL>, ROUTER extends PeerRouter<LOCATOR, HEADER, TAIL, MSG>> APeer
represents a physical peer usingPeerRouter
instances to communicate with its direct neighbours.PeerProxy<LOCATOR,HEADER extends P2PHeader<LOCATOR>, TAIL extends P2PTail<LOCATOR>, MSG extends P2PMessage<LOCATOR, HEADER, ?, TAIL>> PeerRouter<LOCATOR,HEADER extends P2PHeader<LOCATOR>, TAIL extends P2PTail<LOCATOR>, MSG extends P2PMessage<LOCATOR, HEADER, ?, TAIL>> APeerRouter
defines functionality to route aP2PMessage
.Terminal<LOCATOR>ATerminal
provides the least required functionality for receiving messages.