-
- All Implemented Interfaces:
-
org.ice4j.ice.harvest.CandidateHarvester
public abstract class MappingCandidateHarvester extends AbstractCandidateHarvester
A CandidateHarvester which maps existing local HostCandidates to new candidates.
-
-
Field Summary
Fields Modifier and Type Field Description private final TransportAddressfaceprivate final TransportAddressmaskprivate final Stringnameprivate final BooleanmatchPort
-
Constructor Summary
Constructors Constructor Description MappingCandidateHarvester(String name, Boolean matchPort)MappingCandidateHarvester(String name)
-
Method Summary
Modifier and Type Method Description abstract TransportAddressgetFace()abstract TransportAddressgetMask()final StringgetName()final BooleangetMatchPort()Whether this harvester should match the port of the public address. final BooleanpublicAddressMatches(TransportAddress address)Checks whether the given address matches the public address of this harvester. Collection<LocalCandidate>harvest(Component component)Looks for existing HostCandidates in component which match our local address (face) and creates associated ServerReflexiveCandidates substituting mask for the address. -
-
Method Detail
-
getFace
abstract TransportAddress getFace()
-
getMask
abstract TransportAddress getMask()
-
getMatchPort
final Boolean getMatchPort()
Whether this harvester should match the port of the public address.
When matchPort is enabled, mapping candidates will be added only when the local host candidate's address and port match the public (mask) address, and the public (mask) address's port will be used.
When matchPort is disabled, mapping candidates will be added whenever the local host candidate's inet address matches the public (mask) address, and the host candidate port will be preserved.
-
publicAddressMatches
final Boolean publicAddressMatches(TransportAddress address)
-
harvest
Collection<LocalCandidate> harvest(Component component)
Looks for existing HostCandidates in component which match our local address (face) and creates associated ServerReflexiveCandidates substituting mask for the address.
- Parameters:
component- the Component that we'd like to harvest candidates for.
-
-
-
-