Package com.biglybt.plugin.upnp
Class UPnPPlugin
java.lang.Object
com.biglybt.plugin.upnp.UPnPPlugin
- All Implemented Interfaces:
AEDiagnosticsEvidenceGenerator
,UPnPWANConnectionListener
,UPnPListener
,Plugin
,UPnPMappingListener
public class UPnPPlugin
extends Object
implements Plugin, UPnPListener, UPnPMappingListener, UPnPWANConnectionListener, AEDiagnosticsEvidenceGenerator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BooleanParameter
private BooleanParameter
private BooleanParameter
private StringParameter
private BooleanParameter
private BooleanParameter
private LabelParameter
private LoggerChannel
private UPnPMappingManager
private List
<UPnPMapping> private StringParameter
private NatPMPUPnP
private BooleanParameter
private static final String
private PluginInterface
private BooleanParameter
private StringParameter
private StringParameter
private List
<UPnPPluginService> private static final String
private static final String
private static final String[]
private static final String
private static final String
private static final String
private static final String
protected AEMonitor
private BooleanParameter
private UPnP
private BooleanParameter
private UPnPLogListener
private static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addMapping
(UPnPMapping mapping) addMapping
(String desc_resource, boolean tcp, int port, boolean enabled) protected void
addService
(UPnPWANConnection wan_service) protected boolean
protected boolean
checkDeviceStats
(String USN, URL location) protected void
protected void
closeDown
(boolean end_of_day) boolean
deviceDiscovered
(String USN, URL location) void
generate
(IndentWriter writer) protected long
getDeviceStats
(String USN, String stat_key) String[]
getMapping
(boolean tcp, int port) protected String[]
protected String[]
getServices
(UPnPDevice device) protected void
ignoreDevice
(String USN, URL location) protected long
incrementDeviceStats
(String USN, String stat_key) void
initialize
(PluginInterface _plugin_interface) This method is called when the Plugin is loaded by the clientboolean
static void
load
(PluginInterface plugin_interface) protected void
protected void
logNoRepeat
(String usn, URL location, String msg, String suffix) void
mappingChanged
(UPnPMapping mapping) void
mappingDestroyed
(UPnPMapping mapping) void
mappingResult
(UPnPWANConnection connection, boolean ok) void
mappingsReadResult
(UPnPWANConnection connection, boolean ok) protected int
processDevice
(UPnPDevice device) protected int
processServices
(UPnPDevice device, UPnPService[] device_services) void
Provided for use by other plugins.void
refreshMappings
(boolean force) Provided for use by other plugins.protected void
removeService
(UPnPWANConnection wan_service, boolean replaced) void
rootDeviceFound
(UPnPRootDevice device) protected void
setDeviceStats
(String USN, String stat_key, long value) protected void
protected void
startUp()
protected void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.biglybt.pif.Plugin
getInitialProperties
-
Field Details
-
UPNP_PLUGIN_CONFIGSECTION_ID
- See Also:
-
NATPMP_PLUGIN_CONFIGSECTION_ID
- See Also:
-
STATS_DISCOVER
- See Also:
-
STATS_FOUND
- See Also:
-
STATS_READ_OK
- See Also:
-
STATS_READ_BAD
- See Also:
-
STATS_MAP_OK
- See Also:
-
STATS_MAP_BAD
- See Also:
-
STATS_KEYS
-
plugin_interface
-
log
-
mapping_manager
-
upnp
-
upnp_log_listener
-
nat_pmp_upnp
-
natpmp_enable_param
-
nat_pmp_router
-
upnp_enable_param
-
trace_to_log
-
desc_prefix_param
-
alert_success_param
-
grab_ports_param
-
alert_other_port_param
-
alert_device_probs_param
-
release_mappings_param
-
selected_interfaces_param
-
selected_addresses_param
-
ignore_bad_devices
-
ignored_devices_list
-
mappings
-
services
-
root_info_map
-
log_no_repeat_map
-
this_mon
-
-
Constructor Details
-
UPnPPlugin
public UPnPPlugin()
-
-
Method Details
-
load
-
initialize
Description copied from interface:Plugin
This method is called when the Plugin is loaded by the client- Specified by:
initialize
in interfacePlugin
- Parameters:
_plugin_interface
- the interface that the plugin must use to communicate with the client
-
updateIgnoreList
protected void updateIgnoreList() -
ignoreDevice
-
startUp
protected void startUp() -
closeDown
protected void closeDown(boolean end_of_day) -
deviceDiscovered
- Specified by:
deviceDiscovered
in interfaceUPnPListener
-
logNoRepeat
-
rootDeviceFound
- Specified by:
rootDeviceFound
in interfaceUPnPListener
-
checkDeviceStats
-
checkDeviceStats
-
incrementDeviceStats
-
getDeviceStats
-
setDeviceStats
-
mappingResult
- Specified by:
mappingResult
in interfaceUPnPWANConnectionListener
-
mappingsReadResult
- Specified by:
mappingsReadResult
in interfaceUPnPWANConnectionListener
-
getSelectedInterfaces
-
getSelectedAddresses
-
processDevice
- Throws:
UPnPException
-
processServices
protected int processServices(UPnPDevice device, UPnPService[] device_services) throws UPnPException - Throws:
UPnPException
-
addService
- Throws:
UPnPException
-
removeService
-
addMapping
-
mappingChanged
- Specified by:
mappingChanged
in interfaceUPnPMappingListener
-
mappingDestroyed
- Specified by:
mappingDestroyed
in interfaceUPnPMappingListener
-
checkState
protected void checkState() -
getExternalIPAddresses
-
getServices
-
getServices
-
addMapping
-
getMapping
-
getMappings
-
isEnabled
public boolean isEnabled() -
setNATPMPEnableState
protected void setNATPMPEnableState() -
logAlert
-
refreshMappings
public void refreshMappings()Provided for use by other plugins. -
refreshMappings
public void refreshMappings(boolean force) Provided for use by other plugins. -
generate
- Specified by:
generate
in interfaceAEDiagnosticsEvidenceGenerator
-