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 BooleanParameterprivate BooleanParameterprivate BooleanParameterprivate StringParameterprivate BooleanParameterprivate BooleanParameterprivate LabelParameterprivate LoggerChannelprivate UPnPMappingManagerprivate CopyOnWriteList<UPnPMapping> private StringParameterprivate NatPMPUPnPprivate BooleanParameterprivate static final Stringprivate PluginInterfaceprivate BooleanParameterprivate StringParameterprivate StringParameterprivate CopyOnWriteList<UPnPPluginService> private static final Stringprivate static final Stringprivate static final String[]private static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprotected AEMonitorprivate BooleanParameterprivate UPnPprivate BooleanParameterprivate UPnPLogListenerprivate static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddMapping(UPnPMapping mapping) addMapping(String desc_resource, boolean tcp, int port, boolean enabled) protected voidaddService(UPnPWANConnection wan_service) protected voidaddService(UPnPWANIPv6FirewallControl firewall_service) protected booleanprotected booleancheckDeviceStats(String USN, URL location) protected voidprotected voidcloseDown(boolean end_of_day) booleandeviceDiscovered(String USN, URL location) voidgenerate(IndentWriter writer) protected longgetDeviceStats(String USN, String stat_key) String[]getMapping(boolean tcp, int port) protected String[]protected String[]protected static String[]getServices(UPnPDevice device) protected voidignoreDevice(String USN, URL location) protected longincrementDeviceStats(String USN, String stat_key) voidinitialize(PluginInterface _plugin_interface) This method is called when the Plugin is loaded by the clientbooleanstatic voidload(PluginInterface plugin_interface) protected voidprotected voidlogNoRepeat(String usn, URL location, String msg, String suffix) voidmappingChanged(UPnPMapping mapping) voidmappingDestroyed(UPnPMapping mapping) voidmappingResult(UPnPWANConnection connection, boolean ok) voidmappingsReadResult(UPnPWANConnection connection, boolean ok) protected intprocessDevice(UPnPDevice device) protected intprocessServices(UPnPDevice device, UPnPService[] device_services) voidProvided for use by other plugins.voidrefreshMappings(boolean force) Provided for use by other plugins.protected voidremoveService(UPnPWANConnection wan_service, boolean replaced) protected voidremoveService(UPnPWANIPv6FirewallControl firewall_service, boolean replaced) voidrootDeviceFound(UPnPRootDevice device) protected voidsetDeviceStats(String USN, String stat_key, long value) protected voidprotected voidstartUp()protected voidMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Plugin
getInitialPropertiesMethods inherited from interface UPnPListener
deviceStatusUpdate
-
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_cow
-
services_cow
-
root_info_map
-
log_no_repeat_map
-
this_mon
-
-
Constructor Details
-
UPnPPlugin
public UPnPPlugin()
-
-
Method Details
-
load
-
initialize
Description copied from interface:PluginThis method is called when the Plugin is loaded by the client- Specified by:
initializein 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:
deviceDiscoveredin interfaceUPnPListener
-
logNoRepeat
-
rootDeviceFound
- Specified by:
rootDeviceFoundin interfaceUPnPListener
-
checkDeviceStats
-
checkDeviceStats
-
incrementDeviceStats
-
getDeviceStats
-
setDeviceStats
-
mappingResult
- Specified by:
mappingResultin interfaceUPnPWANConnectionListener
-
mappingsReadResult
- Specified by:
mappingsReadResultin interfaceUPnPWANConnectionListener
-
getSelectedInterfaces
-
getSelectedInterfaces
-
getSelectedAddresses
-
processDevice
- Throws:
UPnPException
-
processServices
protected int processServices(UPnPDevice device, UPnPService[] device_services) throws UPnPException - Throws:
UPnPException
-
addService
- Throws:
UPnPException
-
removeService
-
addService
- Throws:
UPnPException
-
removeService
-
addMapping
-
mappingChanged
- Specified by:
mappingChangedin interfaceUPnPMappingListener
-
mappingDestroyed
- Specified by:
mappingDestroyedin 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:
generatein interfaceAEDiagnosticsEvidenceGenerator
-