Class UPnPSSWANConnectionImpl
- java.lang.Object
-
- com.biglybt.net.upnp.impl.services.UPnPSSWANConnectionImpl
-
- All Implemented Interfaces:
UPnPSpecificService
,UPnPWANConnection
- Direct Known Subclasses:
UPnPSSWANIPConnectionImpl
,UPnPSSWANPPPConnectionImpl
public abstract class UPnPSSWANConnectionImpl extends java.lang.Object implements UPnPWANConnection
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
UPnPSSWANConnectionImpl.portMapping
-
Field Summary
Fields Modifier and Type Field Description private static AEMonitor
class_mon
private boolean
last_mapping_check_failed
private java.util.List
listeners
private java.util.List
mappings
private boolean
recheck_mappings
private UPnPServiceImpl
service
private static java.util.List
services
-
Fields inherited from interface com.biglybt.net.upnp.services.UPnPWANConnection
CAP_ALL, CAP_UDP_TCP_SAME_PORT
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
UPnPSSWANConnectionImpl(UPnPServiceImpl _service)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(UPnPWANConnectionListener listener)
void
addPortMapping(boolean tcp, int port, java.lang.String description)
adda new port mapping from external port X to port X on local hostprotected void
checkMappings()
void
deletePortMapping(boolean tcp, int port)
int
getCapabilities()
java.lang.String
getExternalIPAddress()
UPnPService
getGenericService()
UPnPWANConnectionPortMapping[]
getPortMappings()
java.lang.String[]
getStatusInfo()
protected void
log(java.lang.String str)
void
periodicallyRecheckMappings(boolean on)
void
removeListener(UPnPWANConnectionListener listener)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.biglybt.net.upnp.services.UPnPWANConnection
getConnectionType
-
-
-
-
Field Detail
-
class_mon
private static AEMonitor class_mon
-
services
private static java.util.List services
-
service
private UPnPServiceImpl service
-
mappings
private java.util.List mappings
-
listeners
private java.util.List listeners
-
recheck_mappings
private boolean recheck_mappings
-
last_mapping_check_failed
private boolean last_mapping_check_failed
-
-
Constructor Detail
-
UPnPSSWANConnectionImpl
protected UPnPSSWANConnectionImpl(UPnPServiceImpl _service)
-
-
Method Detail
-
getCapabilities
public int getCapabilities()
- Specified by:
getCapabilities
in interfaceUPnPWANConnection
-
getGenericService
public UPnPService getGenericService()
- Specified by:
getGenericService
in interfaceUPnPSpecificService
-
getStatusInfo
public java.lang.String[] getStatusInfo() throws UPnPException
- Specified by:
getStatusInfo
in interfaceUPnPWANConnection
- Throws:
UPnPException
-
periodicallyRecheckMappings
public void periodicallyRecheckMappings(boolean on)
- Specified by:
periodicallyRecheckMappings
in interfaceUPnPWANConnection
-
checkMappings
protected void checkMappings() throws UPnPException
- Throws:
UPnPException
-
addPortMapping
public void addPortMapping(boolean tcp, int port, java.lang.String description) throws UPnPException
Description copied from interface:UPnPWANConnection
adda new port mapping from external port X to port X on local host- Specified by:
addPortMapping
in interfaceUPnPWANConnection
- Throws:
UPnPException
-
deletePortMapping
public void deletePortMapping(boolean tcp, int port) throws UPnPException
- Specified by:
deletePortMapping
in interfaceUPnPWANConnection
- Throws:
UPnPException
-
getPortMappings
public UPnPWANConnectionPortMapping[] getPortMappings() throws UPnPException
- Specified by:
getPortMappings
in interfaceUPnPWANConnection
- Throws:
UPnPException
-
getExternalIPAddress
public java.lang.String getExternalIPAddress() throws UPnPException
- Specified by:
getExternalIPAddress
in interfaceUPnPWANConnection
- Throws:
UPnPException
-
log
protected void log(java.lang.String str)
-
addListener
public void addListener(UPnPWANConnectionListener listener)
- Specified by:
addListener
in interfaceUPnPWANConnection
-
removeListener
public void removeListener(UPnPWANConnectionListener listener)
- Specified by:
removeListener
in interfaceUPnPWANConnection
-
-