java.lang.Object
org.refcodes.p2p.AbstractP2PTail<LOCATOR>
- Type Parameters:
LOCATOR
- Defines the type of the locators identifying a peer.
- All Implemented Interfaces:
org.refcodes.mixin.SourceAccessor<LOCATOR>
,HopsAccessor<LOCATOR>
,P2PTail<LOCATOR>
Abstract implementation of a
P2PTail
.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.p2p.HopsAccessor
HopsAccessor.HopsBuilder<LOCATOR,
B extends HopsAccessor.HopsBuilder<LOCATOR, B>>, HopsAccessor.HopsMutator<LOCATOR>, HopsAccessor.HopsProperty<LOCATOR> -
Field Summary
-
Constructor Summary
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.refcodes.p2p.P2PTail
containsHop
-
Field Details
-
_hops
-
-
Constructor Details
-
AbstractP2PTail
public AbstractP2PTail()Constructs the tail. The source is added upon transmission as first stop-over.
-
-
Method Details
-
getSource
- Specified by:
getSource
in interfaceorg.refcodes.mixin.SourceAccessor<LOCATOR>
-
getHops
Retrieves the trail of peers already passed. -
appendHop
Adds a stop-over peer, being the peer which received the message for dispatching to the next peer. The stop-over will be prepended to the trail of peers. -
toString
-