Package org.bitlet.weupnp
Class PortMappingEntry
- java.lang.Object
-
- org.bitlet.weupnp.PortMappingEntry
-
public class PortMappingEntry extends java.lang.ObjectA 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 Summary
Constructors Constructor Description PortMappingEntry()Creates a new PortMappingEntry
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetEnabled()Gets the enabled flag ("1" if enabled, "0" otherwise)intgetExternalPort()Gets the external (remote) port for this mappingjava.lang.StringgetInternalClient()Gets the internal host this mapping is associated withintgetInternalPort()Gets the internal port for this mappingjava.lang.StringgetPortMappingDescription()Gets the port mapping descriptionjava.lang.StringgetProtocol()Gets the protocol associated with this mappingjava.lang.StringgetRemoteHost()Gets the remote host this mapping is associated withvoidsetEnabled(java.lang.String enabled)Sets theenabledflagvoidsetExternalPort(int externalPort)Sets theexternalPortvoidsetInternalClient(java.lang.String internalClient)Sets theinternalClientvoidsetInternalPort(int internalPort)Sets theinternalPortvoidsetPortMappingDescription(java.lang.String portMappingDescription)Sets theportMappingDescriptionvoidsetProtocol(java.lang.String protocol)Sets theprotocolassociated with this mappingvoidsetRemoteHost(java.lang.String remoteHost)Sets theremoteHost
-
-
-
Method Detail
-
getInternalPort
public int getInternalPort()
Gets the internal port for this mapping- Returns:
- the
internalPort
-
setInternalPort
public void setInternalPort(int internalPort)
Sets theinternalPort- 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 theexternalPort- Parameters:
externalPort- the port to use
-
getRemoteHost
public java.lang.String getRemoteHost()
Gets the remote host this mapping is associated with- Returns:
- the
remoteHost
-
setRemoteHost
public void setRemoteHost(java.lang.String remoteHost)
Sets theremoteHost- Parameters:
remoteHost- the host to set
-
getInternalClient
public java.lang.String getInternalClient()
Gets the internal host this mapping is associated with- Returns:
- the
internalClient
-
setInternalClient
public void setInternalClient(java.lang.String internalClient)
Sets theinternalClient- Parameters:
internalClient- the client to set
-
getProtocol
public java.lang.String getProtocol()
Gets the protocol associated with this mapping- Returns:
protocol
-
setProtocol
public void setProtocol(java.lang.String protocol)
Sets theprotocolassociated with this mapping- Parameters:
protocol- one of TCP or UDP
-
getEnabled
public java.lang.String getEnabled()
Gets the enabled flag ("1" if enabled, "0" otherwise)- Returns:
enabled
-
setEnabled
public void setEnabled(java.lang.String enabled)
Sets theenabledflag- Parameters:
enabled- "1" for enabled, "0" for disabled
-
getPortMappingDescription
public java.lang.String getPortMappingDescription()
Gets the port mapping description- Returns:
portMappingDescription
-
setPortMappingDescription
public void setPortMappingDescription(java.lang.String portMappingDescription)
Sets theportMappingDescription- Parameters:
portMappingDescription- the description to set
-
-