Class STUNResolver.STUNService
- java.lang.Object
-
- org.jivesoftware.smackx.jingleold.nat.STUNResolver.STUNService
-
- Enclosing class:
- STUNResolver
protected static class STUNResolver.STUNService extends Object
STUN service definition.
-
-
Constructor Summary
Constructors Constructor Description STUNService()
Default constructor, without name and port.STUNService(String hostname, int port)
Basic constructor, with the hostname and port
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkBinding()
Check a binding with the STUN currentServer.String
getHostname()
Get the host name of the STUN service.int
getPort()
Get the port of the STUN serviceboolean
isNull()
Basic format test: the service is not null.void
setHostname(String hostname)
Set the hostname of the STUN service.void
setPort(int port)
Set the port number for the STUN service.
-
-
-
Constructor Detail
-
STUNService
public STUNService(String hostname, int port)
Basic constructor, with the hostname and port- Parameters:
hostname
- The hostnameport
- The port
-
STUNService
public STUNService()
Default constructor, without name and port.
-
-
Method Detail
-
getHostname
public String getHostname()
Get the host name of the STUN service.- Returns:
- The host name
-
setHostname
public void setHostname(String hostname)
Set the hostname of the STUN service.- Parameters:
hostname
- The host name of the service.
-
getPort
public int getPort()
Get the port of the STUN service- Returns:
- The port number where the STUN server is waiting.
-
setPort
public void setPort(int port)
Set the port number for the STUN service.- Parameters:
port
- The port number.
-
isNull
public boolean isNull()
Basic format test: the service is not null.- Returns:
- true if the hostname and port are null
-
checkBinding
public boolean checkBinding()
Check a binding with the STUN currentServer. Note: this function blocks for some time, waiting for a response.- Returns:
- true if the currentServer is usable.
-
-