Class PortMappingEntry

java.lang.Object
org.bitlet.weupnp.PortMappingEntry

public class PortMappingEntry extends Object
A PortMappingEntry is the class used to represent port mappings on the GatewayDevice. A port mapping on the GatewayDevice will allow all packets directed to port externalPort of the external IP address of the GatewayDevice using the specified protocol to be redirected to port internalPort of internalClient.
See Also:
  • org.wetorrent.upnp.GatewayDevice
  • org.wetorrent.upnp.GatewayDevice#getExternalIPAddress()
  • Constructor Details

    • PortMappingEntry

      public PortMappingEntry()
      Creates a new PortMappingEntry
  • Method Details

    • getInternalPort

      public int getInternalPort()
      Gets the internal port for this mapping
      Returns:
      the internalPort
    • setInternalPort

      public void setInternalPort(int internalPort)
      Sets the internalPort
      Parameters:
      internalPort - the port to use
    • getExternalPort

      public int getExternalPort()
      Gets the external (remote) port for this mapping
      Returns:
      the externalPort
    • setExternalPort

      public void setExternalPort(int externalPort)
      Sets the externalPort
      Parameters:
      externalPort - the port to use
    • getRemoteHost

      public String getRemoteHost()
      Gets the remote host this mapping is associated with
      Returns:
      the remoteHost
    • setRemoteHost

      public void setRemoteHost(String remoteHost)
      Sets the remoteHost
      Parameters:
      remoteHost - the host to set
    • getInternalClient

      public String getInternalClient()
      Gets the internal host this mapping is associated with
      Returns:
      the internalClient
    • setInternalClient

      public void setInternalClient(String internalClient)
      Sets the internalClient
      Parameters:
      internalClient - the client to set
    • getProtocol

      public String getProtocol()
      Gets the protocol associated with this mapping
      Returns:
      protocol
    • setProtocol

      public void setProtocol(String protocol)
      Sets the protocol associated with this mapping
      Parameters:
      protocol - one of TCP or UDP
    • getEnabled

      public String getEnabled()
      Gets the enabled flag ("1" if enabled, "0" otherwise)
      Returns:
      enabled
    • setEnabled

      public void setEnabled(String enabled)
      Sets the enabled flag
      Parameters:
      enabled - "1" for enabled, "0" for disabled
    • getPortMappingDescription

      public String getPortMappingDescription()
      Gets the port mapping description
      Returns:
      portMappingDescription
    • setPortMappingDescription

      public void setPortMappingDescription(String portMappingDescription)
      Sets the portMappingDescription
      Parameters:
      portMappingDescription - the description to set