Package com.biglybt.net.natpmp.upnp.impl
Class NatPMPUPnPRootDeviceImpl.NatPMPUPnPWANConnection
- java.lang.Object
-
- com.biglybt.net.natpmp.upnp.impl.NatPMPUPnPRootDeviceImpl.NatPMPUPnPWANConnection
-
- All Implemented Interfaces:
UPnPSpecificService
,UPnPWANConnection
,UPnPService
- Enclosing class:
- NatPMPUPnPRootDeviceImpl
protected class NatPMPUPnPRootDeviceImpl.NatPMPUPnPWANConnection extends java.lang.Object implements UPnPWANConnection, UPnPService
-
-
Field Summary
Fields Modifier and Type Field Description private NatPMPImpl
nat_impl
-
Fields inherited from interface com.biglybt.net.upnp.services.UPnPWANConnection
CAP_ALL, CAP_UDP_TCP_SAME_PORT
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
NatPMPUPnPWANConnection()
-
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 hostvoid
deletePortMapping(boolean tcp, int port)
UPnPAction
getAction(java.lang.String name)
UPnPAction[]
getActions()
int
getCapabilities()
java.lang.String
getConnectionType()
java.util.List<java.net.URL>
getControlURLs()
UPnPDevice
getDevice()
boolean
getDirectInvocations()
java.lang.String
getExternalIPAddress()
UPnPService
getGenericService()
UPnPWANConnectionPortMapping[]
getPortMappings()
java.lang.String
getServiceType()
UPnPSpecificService
getSpecificService()
gets a specific service if such is supportedUPnPStateVariable
getStateVariable(java.lang.String name)
UPnPStateVariable[]
getStateVariables()
java.lang.String[]
getStatusInfo()
boolean
isConnectable()
void
periodicallyRecheckMappings(boolean on)
void
removeListener(UPnPWANConnectionListener listener)
void
setDirectInvocations(boolean force)
void
setPreferredControlURL(java.net.URL url)
-
-
-
Field Detail
-
nat_impl
private NatPMPImpl nat_impl
-
-
Constructor Detail
-
NatPMPUPnPWANConnection
protected NatPMPUPnPWANConnection() throws UPnPException
- Throws:
UPnPException
-
-
Method Detail
-
getDevice
public UPnPDevice getDevice()
- Specified by:
getDevice
in interfaceUPnPService
-
getServiceType
public java.lang.String getServiceType()
- Specified by:
getServiceType
in interfaceUPnPService
-
getConnectionType
public java.lang.String getConnectionType()
- Specified by:
getConnectionType
in interfaceUPnPWANConnection
-
getControlURLs
public java.util.List<java.net.URL> getControlURLs() throws UPnPException
- Specified by:
getControlURLs
in interfaceUPnPService
- Throws:
UPnPException
-
setPreferredControlURL
public void setPreferredControlURL(java.net.URL url)
- Specified by:
setPreferredControlURL
in interfaceUPnPService
-
isConnectable
public boolean isConnectable()
- Specified by:
isConnectable
in interfaceUPnPService
-
getActions
public UPnPAction[] getActions() throws UPnPException
- Specified by:
getActions
in interfaceUPnPService
- Throws:
UPnPException
-
getAction
public UPnPAction getAction(java.lang.String name) throws UPnPException
- Specified by:
getAction
in interfaceUPnPService
- Throws:
UPnPException
-
getStateVariables
public UPnPStateVariable[] getStateVariables() throws UPnPException
- Specified by:
getStateVariables
in interfaceUPnPService
- Throws:
UPnPException
-
getStateVariable
public UPnPStateVariable getStateVariable(java.lang.String name) throws UPnPException
- Specified by:
getStateVariable
in interfaceUPnPService
- Throws:
UPnPException
-
getSpecificService
public UPnPSpecificService getSpecificService()
gets a specific service if such is supported- Specified by:
getSpecificService
in interfaceUPnPService
- Returns:
-
getGenericService
public UPnPService getGenericService()
- Specified by:
getGenericService
in interfaceUPnPSpecificService
-
getDirectInvocations
public boolean getDirectInvocations()
- Specified by:
getDirectInvocations
in interfaceUPnPService
-
setDirectInvocations
public void setDirectInvocations(boolean force)
- Specified by:
setDirectInvocations
in interfaceUPnPService
-
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
-
getPortMappings
public UPnPWANConnectionPortMapping[] getPortMappings() throws UPnPException
- Specified by:
getPortMappings
in interfaceUPnPWANConnection
- Throws:
UPnPException
-
deletePortMapping
public void deletePortMapping(boolean tcp, int port) throws UPnPException
- Specified by:
deletePortMapping
in interfaceUPnPWANConnection
- Throws:
UPnPException
-
getStatusInfo
public java.lang.String[] getStatusInfo() throws UPnPException
- Specified by:
getStatusInfo
in interfaceUPnPWANConnection
- Throws:
UPnPException
-
getExternalIPAddress
public java.lang.String getExternalIPAddress() throws UPnPException
- Specified by:
getExternalIPAddress
in interfaceUPnPWANConnection
- Throws:
UPnPException
-
periodicallyRecheckMappings
public void periodicallyRecheckMappings(boolean on)
- Specified by:
periodicallyRecheckMappings
in interfaceUPnPWANConnection
-
getCapabilities
public int getCapabilities()
- Specified by:
getCapabilities
in interfaceUPnPWANConnection
-
addListener
public void addListener(UPnPWANConnectionListener listener)
- Specified by:
addListener
in interfaceUPnPWANConnection
-
removeListener
public void removeListener(UPnPWANConnectionListener listener)
- Specified by:
removeListener
in interfaceUPnPWANConnection
-
-