Module org.refcodes.p2p
Package org.refcodes.p2p
-
Interface Summary Interface Description HopCountAccessor Provides an accessor for a hop count property.HopCountAccessor.HopCountBuilder<B extends HopCountAccessor.HopCountBuilder<B>> Provides a builder method for a hop count property returning the builder for applying multiple build operations.HopCountAccessor.HopCountMutator Provides a mutator for a hop count property.HopCountAccessor.HopCountProperty 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.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.P2PMessageConsumer<MSG extends P2PMessage<?,?,?,?>,PEER extends Peer<?,?,?,MSG,?>> 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. -
Class Summary Class Description AbstractP2PHeader<LOCATOR> Abstract implementation of aP2PHeader
.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. -
Exception Summary Exception Description AbstractLocatorException Base exception for peer ID related exceptions.NoSuchDestinationException Thrown in case there is none such peer.P2PException Base exception for this package.