com.aelitis.net.natpmp.upnp.impl
Class NatPMPUPnPRootDeviceImpl.NatPMPUPnPWANConnection

java.lang.Object
  extended by com.aelitis.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 inherited from interface com.aelitis.net.upnp.services.UPnPWANConnection
CAP_ALL, CAP_UDP_TCP_SAME_PORT
 
Constructor Summary
protected NatPMPUPnPRootDeviceImpl.NatPMPUPnPWANConnection()
           
 
Method Summary
 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 host
 void 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 supported
 UPnPStateVariable 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NatPMPUPnPRootDeviceImpl.NatPMPUPnPWANConnection

protected NatPMPUPnPRootDeviceImpl.NatPMPUPnPWANConnection()
                                                    throws UPnPException
Throws:
UPnPException
Method Detail

getDevice

public UPnPDevice getDevice()
Specified by:
getDevice in interface UPnPService

getServiceType

public java.lang.String getServiceType()
Specified by:
getServiceType in interface UPnPService

getConnectionType

public java.lang.String getConnectionType()
Specified by:
getConnectionType in interface UPnPWANConnection

getControlURLs

public java.util.List<java.net.URL> getControlURLs()
                                            throws UPnPException
Specified by:
getControlURLs in interface UPnPService
Throws:
UPnPException

setPreferredControlURL

public void setPreferredControlURL(java.net.URL url)
Specified by:
setPreferredControlURL in interface UPnPService

isConnectable

public boolean isConnectable()
Specified by:
isConnectable in interface UPnPService

getActions

public UPnPAction[] getActions()
                        throws UPnPException
Specified by:
getActions in interface UPnPService
Throws:
UPnPException

getAction

public UPnPAction getAction(java.lang.String name)
                     throws UPnPException
Specified by:
getAction in interface UPnPService
Throws:
UPnPException

getStateVariables

public UPnPStateVariable[] getStateVariables()
                                      throws UPnPException
Specified by:
getStateVariables in interface UPnPService
Throws:
UPnPException

getStateVariable

public UPnPStateVariable getStateVariable(java.lang.String name)
                                   throws UPnPException
Specified by:
getStateVariable in interface UPnPService
Throws:
UPnPException

getSpecificService

public UPnPSpecificService getSpecificService()
gets a specific service if such is supported

Specified by:
getSpecificService in interface UPnPService
Returns:

getGenericService

public UPnPService getGenericService()
Specified by:
getGenericService in interface UPnPSpecificService

getDirectInvocations

public boolean getDirectInvocations()
Specified by:
getDirectInvocations in interface UPnPService

setDirectInvocations

public void setDirectInvocations(boolean force)
Specified by:
setDirectInvocations in interface UPnPService

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 interface UPnPWANConnection
Throws:
UPnPException

getPortMappings

public UPnPWANConnectionPortMapping[] getPortMappings()
                                               throws UPnPException
Specified by:
getPortMappings in interface UPnPWANConnection
Throws:
UPnPException

deletePortMapping

public void deletePortMapping(boolean tcp,
                              int port)
                       throws UPnPException
Specified by:
deletePortMapping in interface UPnPWANConnection
Throws:
UPnPException

getStatusInfo

public java.lang.String[] getStatusInfo()
                                 throws UPnPException
Specified by:
getStatusInfo in interface UPnPWANConnection
Throws:
UPnPException

getExternalIPAddress

public java.lang.String getExternalIPAddress()
                                      throws UPnPException
Specified by:
getExternalIPAddress in interface UPnPWANConnection
Throws:
UPnPException

periodicallyRecheckMappings

public void periodicallyRecheckMappings(boolean on)
Specified by:
periodicallyRecheckMappings in interface UPnPWANConnection

getCapabilities

public int getCapabilities()
Specified by:
getCapabilities in interface UPnPWANConnection

addListener

public void addListener(UPnPWANConnectionListener listener)
Specified by:
addListener in interface UPnPWANConnection

removeListener

public void removeListener(UPnPWANConnectionListener listener)
Specified by:
removeListener in interface UPnPWANConnection