Package 

Interface CandidateHarvester

  • All Implemented Interfaces:

    
    public interface CandidateHarvester
    
                        

    A CandidateHarvester gathers a certain kind of Candidates (e.g. host, reflexive, or relayed) for a specified .

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Collection<LocalCandidate> harvest(Component component) Gathers all candidate addresses of the type that this CandidateHarvester supports.
      abstract HarvestStatistics getHarvestStatistics() Returns the statistics describing how well the various harvests of this harvester went.
      abstract boolean isHostHarvester() Returns true if this CandidateHarvester is to be considered a harvester for host candidates.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • harvest

         abstract Collection<LocalCandidate> harvest(Component component)

        Gathers all candidate addresses of the type that this CandidateHarvester supports. The gathered candidate addresses are to be added by this CandidateHarvester to the specified Component using addLocalCandidate as soon as they are discovered.

        Parameters:
        component - the Component that we'd like to gather candidate addresses for.
      • isHostHarvester

         abstract boolean isHostHarvester()

        Returns true if this CandidateHarvester is to be considered a harvester for host candidates. Such a harvester should 1. Create local candidates of type HOST_CANDIDATE. 2. Not depend on other local candidates, already harvested for the component for which it is called. 3. Not perform blocking operations while harvesting.