Package org.bitlet.weupnp
Class PortMappingEntry
java.lang.Object
org.bitlet.weupnp.PortMappingEntry
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the enabled flag ("1" if enabled, "0" otherwise)intGets the external (remote) port for this mappingGets the internal host this mapping is associated withintGets the internal port for this mappingGets the port mapping descriptionGets the protocol associated with this mappingGets the remote host this mapping is associated withvoidsetEnabled(String enabled) Sets theenabledflagvoidsetExternalPort(int externalPort) Sets theexternalPortvoidsetInternalClient(String internalClient) Sets theinternalClientvoidsetInternalPort(int internalPort) Sets theinternalPortvoidsetPortMappingDescription(String portMappingDescription) Sets theportMappingDescriptionvoidsetProtocol(String protocol) Sets theprotocolassociated with this mappingvoidsetRemoteHost(String remoteHost) Sets theremoteHost
-
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 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
Gets the remote host this mapping is associated with- Returns:
- the
remoteHost
-
setRemoteHost
Sets theremoteHost- Parameters:
remoteHost- the host to set
-
getInternalClient
Gets the internal host this mapping is associated with- Returns:
- the
internalClient
-
setInternalClient
Sets theinternalClient- Parameters:
internalClient- the client to set
-
getProtocol
Gets the protocol associated with this mapping- Returns:
protocol
-
setProtocol
Sets theprotocolassociated with this mapping- Parameters:
protocol- one of TCP or UDP
-
getEnabled
Gets the enabled flag ("1" if enabled, "0" otherwise)- Returns:
enabled
-
setEnabled
Sets theenabledflag- Parameters:
enabled- "1" for enabled, "0" for disabled
-
getPortMappingDescription
Gets the port mapping description- Returns:
portMappingDescription
-
setPortMappingDescription
Sets theportMappingDescription- Parameters:
portMappingDescription- the description to set
-