Class AbstractP2PHeader<LOCATOR>

java.lang.Object
org.refcodes.p2p.AbstractP2PHeader<LOCATOR>
Type Parameters:
LOCATOR - Defines the type of the locators identifying a peer.
All Implemented Interfaces:
org.refcodes.mixin.DestinationAccessor<LOCATOR>, P2PHeader<LOCATOR>

public class AbstractP2PHeader<LOCATOR> extends Object implements P2PHeader<LOCATOR>
Abstract implementation of a P2PHeader.
  • Field Details

    • _destination

      protected LOCATOR _destination
  • Constructor Details

    • AbstractP2PHeader

      public AbstractP2PHeader(LOCATOR aDestination)
      Constructs the header using the given destination locator as destination (getDestination()).
      Parameters:
      aDestination - The destination locator to use.
  • Method Details

    • getDestination

      public LOCATOR getDestination()
      Specified by:
      getDestination in interface org.refcodes.mixin.DestinationAccessor<LOCATOR>
    • toString

      public String toString()
      Overrides:
      toString in class Object