Module org.refcodes.p2p
Package org.refcodes.p2p
Interface PeerProxy<LOCATOR,HEADER extends P2PHeader<LOCATOR>,TAIL extends P2PTail<LOCATOR>,MSG extends P2PMessage<LOCATOR,HEADER,?,TAIL>>
- Type Parameters:
LOCATOR
- Defines the type of the locators identifying a peer.HEADER
- TheP2PHeader
defines the static attributes addressed for the target of theP2PMessage
(a header might be signed as it is not modified during dispatch).TAIL
- TheP2PTail
describes the dynamic attributes required during dispatch of aP2PMessage
(a tail is modified during dispatch by having the visited hops appended).MSG
- The (sub-)type of theP2PMessage
being processed by the accordingPeer
(sub-)type.
- All Superinterfaces:
PeerRouter<LOCATOR,
HEADER, TAIL, MSG>
public interface PeerProxy<LOCATOR,HEADER extends P2PHeader<LOCATOR>,TAIL extends P2PTail<LOCATOR>,MSG extends P2PMessage<LOCATOR,HEADER,?,TAIL>>
extends PeerRouter<LOCATOR,HEADER,TAIL,MSG>
A
PeerProxy
represents a proxy for a physical Peer
. A
physical Peer
could use serial communication or networking for
attaching with another physical Peer
by the abstraction of a
PeerProxy
. You can think of a PeerProxy
being the stub and a
Peer
being the skeleton (as of RPC) of a peer. As a Peer
is
also a PeerProxy
, for testing purposes a P2P network can be
established with POJO implementations of a Peer.-
Method Summary
Methods inherited from interface org.refcodes.p2p.PeerRouter
getHopCount, getHopCount, sendMessage