Class STUNResolver.STUNService
java.lang.Object
org.jivesoftware.smackx.jingleold.nat.STUNResolver.STUNService
- Enclosing class:
- STUNResolver
STUN service definition.
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor, without name and port.STUNService(String hostname, int port) Basic constructor, with the hostname and port -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck a binding with the STUN currentServer.Get the host name of the STUN service.intgetPort()Get the port of the STUN servicebooleanisNull()Basic format test: the service is not null.voidsetHostname(String hostname) Set the hostname of the STUN service.voidsetPort(int port) Set the port number for the STUN service.
-
Constructor Details
-
STUNService
Basic constructor, with the hostname and port- Parameters:
hostname- The hostnameport- The port
-
STUNService
public STUNService()Default constructor, without name and port.
-
-
Method Details
-
getHostname
Get the host name of the STUN service.- Returns:
- The host name
-
setHostname
Set the hostname of the STUN service.- Parameters:
hostname- The host name of the service.
-
getPort
Get the port of the STUN service- Returns:
- The port number where the STUN server is waiting.
-
setPort
Set the port number for the STUN service.- Parameters:
port- The port number.
-
isNull
Basic format test: the service is not null.- Returns:
- true if the hostname and port are null
-
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.
-