Package 

Class HostCandidateHarvester

  • All Implemented Interfaces:

    
    public class HostCandidateHarvester
    
                        

    A HostCandidateHarvester gathers host Candidates for a specified org.ice4j.ice.Component. Most CandidateHarvesters would rely on the output of the host harvester, that is all host addresses, to be already present and bound in a Component before being able to harvest the type of addresses that they are responsible for.

    • Constructor Detail

    • Method Detail

      • harvest

         void harvest(Component component, int preferredPort, int minPort, int maxPort, Transport transport)

        Gathers all candidate addresses on the local machine, binds sockets on them and creates HostCandidates. The harvester would always try to bind the sockets on the specified preferredPort first. If that fails we will move through all ports between minPort and maxPort and give up if still can't find a free port. If 0, 0, 0 are specified for preferred, min and max port, an ephemeral port will be used instead.

        Parameters:
        component - the Component that we'd like to gather candidate addresses for.
        preferredPort - the port number that should be tried first when binding local Candidate sockets for this Component.
        minPort - the port number where we should first try to bind before moving to the next one (i.e.
        maxPort - the maximum port number where we should try binding before giving up and throwing an exception.
        transport - transport protocol used
      • initializeInterfaceFilters

         static synchronized void initializeInterfaceFilters()

        Initializes the host candidate interface filters stored in the org.ice4j.ice.harvest.ALLOWED_INTERFACES and org.ice4j.ice.harvest.BLOCKED_INTERFACES properties.