public class UPNPHarvester extends AbstractCandidateHarvester
Component
using UPnP.Modifier and Type | Class and Description |
---|---|
private class |
UPNPHarvester.UPNPThread
UPnP discover thread.
|
Modifier and Type | Field and Description |
---|---|
private org.bitlet.weupnp.GatewayDevice |
device
Gateway device.
|
private int |
finishThreads
Number of UPnP discover threads that have finished.
|
private static Logger |
logger
The logger.
|
private static int |
MAX_RETRIES
Maximum port to try to allocate.
|
private Object |
rootSync
Synchronization object.
|
private static String |
stIP
ST search field for WANIPConnection.
|
private static String |
stPPP
ST search field for WANPPPConnection.
|
Constructor and Description |
---|
UPNPHarvester() |
Modifier and Type | Method and Description |
---|---|
private List<LocalCandidate> |
createUPNPCandidate(IceSocketWrapper socket,
String externalIP,
int port,
Component component,
org.bitlet.weupnp.GatewayDevice device)
Create a UPnP candidate.
|
Collection<LocalCandidate> |
harvest(Component component)
Gathers UPnP candidates for all host Candidates that are
already present in the specified component.
|
String |
toString()
Returns a String representation of this harvester containing its
name.
|
getHarvestStatistics, isHostHarvester
private static final Logger logger
private static final int MAX_RETRIES
private static final String stIP
private static final String stPPP
private final Object rootSync
private org.bitlet.weupnp.GatewayDevice device
private int finishThreads
public Collection<LocalCandidate> harvest(Component component)
component
- the Component
that we'd like to gather candidate
UPnP Candidates forprivate List<LocalCandidate> createUPNPCandidate(IceSocketWrapper socket, String externalIP, int port, Component component, org.bitlet.weupnp.GatewayDevice device)
socket
- local socketexternalIP
- external IP addressport
- local portcomponent
- parent componentdevice
- the UPnP gateway deviceCopyright © 2018. All rights reserved.