Package com.biglybt.net.upnp.impl.device
Class UPnPRootDeviceImpl
- java.lang.Object
-
- com.biglybt.net.upnp.impl.device.UPnPRootDeviceImpl
-
- All Implemented Interfaces:
UPnPRootDevice
public class UPnPRootDeviceImpl extends java.lang.Object implements UPnPRootDevice
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.net.URL>
alt_locations
static boolean[]
BAD_ROUTER_REPORT_FAIL
static java.lang.String[]
BAD_ROUTER_VERSIONS
private boolean
destroyed
private java.lang.String
info
private java.util.List
listeners
private java.net.InetAddress
local_address
private java.net.URL
location
private java.net.NetworkInterface
network_interface
private boolean
port_mapping_result_received
private UPnPDeviceImpl
root_device
static java.lang.String[]
ROUTERS
private java.net.URL
saved_url_base_for_relative_urls
private UPnPImpl
upnp
private java.net.URL
url_base_for_relative_urls
private java.lang.String
usn
-
Constructor Summary
Constructors Constructor Description UPnPRootDeviceImpl(UPnPImpl _upnp, java.net.NetworkInterface _network_interface, java.net.InetAddress _local_address, java.lang.String _usn, java.net.URL _location)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addAlternativeLocation(java.net.URL alt_location)
void
addListener(UPnPRootDeviceListener l)
protected void
clearRelativeBaseURL()
void
destroy(boolean replaced)
protected java.lang.String
getAbsoluteURL(java.lang.String url)
java.util.List<java.net.URL>
getAlternativeLocations()
UPnPDevice
getDevice()
java.util.Map
getDiscoveryCache()
java.lang.String
getInfo()
java.net.InetAddress
getLocalAddress()
java.net.URL
getLocation()
java.net.NetworkInterface
getNetworkInterface()
UPnP
getUPnP()
java.lang.String
getUSN()
protected boolean
isBadVersion(java.lang.String current, java.lang.String bad)
boolean
isDestroyed()
void
portMappingResult(boolean ok)
void
removeListener(UPnPRootDeviceListener l)
protected void
restoreRelativeBaseURL()
-
-
-
Field Detail
-
ROUTERS
public static final java.lang.String[] ROUTERS
-
BAD_ROUTER_VERSIONS
public static final java.lang.String[] BAD_ROUTER_VERSIONS
-
BAD_ROUTER_REPORT_FAIL
public static final boolean[] BAD_ROUTER_REPORT_FAIL
-
upnp
private final UPnPImpl upnp
-
network_interface
private final java.net.NetworkInterface network_interface
-
local_address
private final java.net.InetAddress local_address
-
usn
private final java.lang.String usn
-
location
private final java.net.URL location
-
alt_locations
private final java.util.List<java.net.URL> alt_locations
-
url_base_for_relative_urls
private java.net.URL url_base_for_relative_urls
-
saved_url_base_for_relative_urls
private java.net.URL saved_url_base_for_relative_urls
-
info
private java.lang.String info
-
root_device
private UPnPDeviceImpl root_device
-
port_mapping_result_received
private boolean port_mapping_result_received
-
destroyed
private boolean destroyed
-
listeners
private java.util.List listeners
-
-
Constructor Detail
-
UPnPRootDeviceImpl
public UPnPRootDeviceImpl(UPnPImpl _upnp, java.net.NetworkInterface _network_interface, java.net.InetAddress _local_address, java.lang.String _usn, java.net.URL _location) throws UPnPException
- Throws:
UPnPException
-
-
Method Detail
-
getDiscoveryCache
public java.util.Map getDiscoveryCache()
- Specified by:
getDiscoveryCache
in interfaceUPnPRootDevice
-
portMappingResult
public void portMappingResult(boolean ok)
-
getInfo
public java.lang.String getInfo()
- Specified by:
getInfo
in interfaceUPnPRootDevice
-
getAbsoluteURL
protected java.lang.String getAbsoluteURL(java.lang.String url)
-
clearRelativeBaseURL
protected void clearRelativeBaseURL()
-
restoreRelativeBaseURL
protected void restoreRelativeBaseURL()
-
getUPnP
public UPnP getUPnP()
- Specified by:
getUPnP
in interfaceUPnPRootDevice
-
getNetworkInterface
public java.net.NetworkInterface getNetworkInterface()
- Specified by:
getNetworkInterface
in interfaceUPnPRootDevice
-
getLocalAddress
public java.net.InetAddress getLocalAddress()
- Specified by:
getLocalAddress
in interfaceUPnPRootDevice
-
getUSN
public java.lang.String getUSN()
- Specified by:
getUSN
in interfaceUPnPRootDevice
-
getLocation
public java.net.URL getLocation()
- Specified by:
getLocation
in interfaceUPnPRootDevice
-
addAlternativeLocation
public boolean addAlternativeLocation(java.net.URL alt_location)
-
getAlternativeLocations
public java.util.List<java.net.URL> getAlternativeLocations()
-
getDevice
public UPnPDevice getDevice()
- Specified by:
getDevice
in interfaceUPnPRootDevice
-
destroy
public void destroy(boolean replaced)
-
isDestroyed
public boolean isDestroyed()
- Specified by:
isDestroyed
in interfaceUPnPRootDevice
-
addListener
public void addListener(UPnPRootDeviceListener l)
- Specified by:
addListener
in interfaceUPnPRootDevice
-
removeListener
public void removeListener(UPnPRootDeviceListener l)
- Specified by:
removeListener
in interfaceUPnPRootDevice
-
isBadVersion
protected boolean isBadVersion(java.lang.String current, java.lang.String bad)
-
-