Package com.biglybt.net.upnp.impl
Class UPnPImpl
java.lang.Object
com.biglybt.pif.utils.resourcedownloader.ResourceDownloaderAdapter
com.biglybt.net.upnp.impl.UPnPImpl
- All Implemented Interfaces:
SSDPIGDListener
,UPnP
,ResourceDownloaderListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate UPnPAdapter
private AsyncDispatcher
private static AEMonitor
private ThreadPool
private Set
private int
private int
private List
private List
private List
static final String
private List<UPnPListener>
private AEMonitor
private Map<String,
UPnPRootDeviceImpl> private static UPnPImpl
private SSDPIGD
protected AEMonitor
private int
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
UPnPImpl
(UPnPAdapter _adapter, String[] _selected_interfaces) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
downloadXML
(UPnPDeviceImpl device, URL url) downloadXML
(UPnPRootDeviceImpl root, URL url) protected SimpleXMLParserDocument
downloadXMLSupport
(String friendly_name, URL url) void
failed
(ResourceDownloader downloader, ResourceDownloaderException e) protected boolean
static UPnP
getSingleton
(UPnPAdapter adapter, String[] selected_interfaces) getSSDP()
protected File
void
injectDiscoveryCache
(Map cache) void
interfaceChanged
(NetworkInterface network_interface) void
Logs a message to all registered log listenersvoid
void
parseXML
(InputStream _is) performSOAPRequest
(UPnPService service, String soap_action, String request) performSOAPRequest
(UPnPService service, String soap_action, String request, boolean use_http_connection) The use_http_connection flag is set to false sometimes to avoid using the URLConnection library for some dopey UPnP routers.void
void
void
reportActivity
(ResourceDownloader downloader, String activity) void
reset()
resets by removing all root devices and then rediscovering themvoid
void
rootDiscovered
(NetworkInterface network_interface, InetAddress local_address, String usn, URL location) void
rootLost
(InetAddress local_address, String usn) void
search()
scan for newvoid
Methods inherited from class com.biglybt.pif.utils.resourcedownloader.ResourceDownloaderAdapter
completed, reportAmountComplete, reportPercentComplete
-
Field Details
-
NL
- See Also:
-
singleton
-
class_mon
-
adapter
-
ssdp
-
root_locations
-
log_listeners
-
log_history
-
log_alert_history
-
rd_listeners
-
rd_listeners_mon
-
http_calls_ok
private int http_calls_ok -
direct_calls_ok
private int direct_calls_ok -
trace_index
private int trace_index -
async_dispatcher
-
device_dispatcher
-
device_dispatcher_pending
-
failed_urls
-
this_mon
-
-
Constructor Details
-
UPnPImpl
- Throws:
UPnPException
-
-
Method Details
-
getSingleton
public static UPnP getSingleton(UPnPAdapter adapter, String[] selected_interfaces) throws UPnPException - Throws:
UPnPException
-
getSSDP
-
injectDiscoveryCache
- Specified by:
injectDiscoveryCache
in interfaceUPnP
-
rootDiscovered
public void rootDiscovered(NetworkInterface network_interface, InetAddress local_address, String usn, URL location) - Specified by:
rootDiscovered
in interfaceSSDPIGDListener
-
rootAlive
- Specified by:
rootAlive
in interfaceSSDPIGDListener
-
rootLost
- Specified by:
rootLost
in interfaceSSDPIGDListener
-
interfaceChanged
- Specified by:
interfaceChanged
in interfaceSSDPIGDListener
-
search
public void search()Description copied from interface:UPnP
scan for new -
search
-
reset
public void reset()Description copied from interface:UPnP
resets by removing all root devices and then rediscovering them -
parseXML
public SimpleXMLParserDocument parseXML(InputStream _is) throws SimpleXMLParserDocumentException, IOException -
downloadXML
- Throws:
UPnPException
-
downloadXML
- Throws:
UPnPException
-
downloadXMLSupport
protected SimpleXMLParserDocument downloadXMLSupport(String friendly_name, URL url) throws UPnPException - Throws:
UPnPException
-
forceDirect
protected boolean forceDirect() -
performSOAPRequest
public SimpleXMLParserDocument performSOAPRequest(UPnPService service, String soap_action, String request) throws SimpleXMLParserDocumentException, UPnPException, IOException -
performSOAPRequest
public SimpleXMLParserDocument performSOAPRequest(UPnPService service, String soap_action, String request, boolean use_http_connection) throws SimpleXMLParserDocumentException, UPnPException, IOException The use_http_connection flag is set to false sometimes to avoid using the URLConnection library for some dopey UPnP routers. -
getTraceFile
-
getAdapter
-
reportActivity
- Specified by:
reportActivity
in interfaceResourceDownloaderListener
- Overrides:
reportActivity
in classResourceDownloaderAdapter
-
failed
- Specified by:
failed
in interfaceResourceDownloaderListener
- Overrides:
failed
in classResourceDownloaderAdapter
-
log
-
log
Description copied from interface:UPnP
Logs a message to all registered log listeners -
logAlert
-
addLogListener
- Specified by:
addLogListener
in interfaceUPnP
-
removeLogListener
- Specified by:
removeLogListener
in interfaceUPnP
-
getRootDevices
- Specified by:
getRootDevices
in interfaceUPnP
-
addRootDeviceListener
- Specified by:
addRootDeviceListener
in interfaceUPnP
-
removeRootDeviceListener
- Specified by:
removeRootDeviceListener
in interfaceUPnP
-