public class STUN
extends org.jivesoftware.smack.packet.SimpleIQ
| Modifier and Type | Class and Description |
|---|---|
static class |
STUN.Provider
IQProvider for RTP Bridge packets.
|
static class |
STUN.StunServerAddress
Provides easy abstract to store STUN Server Addresses and Ports.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DOMAIN
Element name of the stanza extension.
|
static java.lang.String |
ELEMENT_NAME
Element name of the stanza extension.
|
static java.lang.String |
NAMESPACE
Namespace of the stanza extension.
|
| Constructor and Description |
|---|
STUN()
Creates a STUN IQ.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getPublicIp()
Get Public Ip returned from the XMPP server.
|
java.util.List<STUN.StunServerAddress> |
getServers()
Get a list of STUN Servers recommended by the Server.
|
static STUN |
getSTUNServer(org.jivesoftware.smack.XMPPConnection connection)
Get a new STUN Server Address and port from the server.
|
static boolean |
serviceAvailable(org.jivesoftware.smack.XMPPConnection connection)
Check if the server support STUN Service.
|
createErrorResponse, createErrorResponse, createErrorResponse, createResultIQ, getChildElementName, getChildElementNamespace, getChildElementQName, getChildElementXML, getElementName, getType, setType, toString, toXMLaddCommonAttributes, addExtension, addExtensions, appendErrorIfExists, getDefaultLanguage, getError, getExtension, getExtension, getExtension, getExtensionElement, getExtensions, getExtensions, getExtensions, getExtensions, getExtensionsMap, getFrom, getLanguage, getNamespace, getStanzaId, getTo, hasExtension, hasExtension, hasStanzaIdSet, logCommonAttributes, overrideExtension, removeExtension, removeExtension, setError, setError, setFrom, setLanguage, setNewStanzaId, setStanzaId, setStanzaId, setTo, throwIfNoStanzaIdclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final java.lang.String DOMAIN
public static final java.lang.String ELEMENT_NAME
public static final java.lang.String NAMESPACE
public java.util.List<STUN.StunServerAddress> getServers()
public java.lang.String getPublicIp()
public static STUN getSTUNServer(org.jivesoftware.smack.XMPPConnection connection) throws org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException
connection - TODO javadoc me pleaseorg.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.java.lang.InterruptedException - if the calling thread was interrupted.public static boolean serviceAvailable(org.jivesoftware.smack.XMPPConnection connection)
throws org.jivesoftware.smack.XMPPException,
org.jivesoftware.smack.SmackException,
java.lang.InterruptedException
connection - the connectionorg.jivesoftware.smack.SmackException - if Smack detected an exceptional situation.org.jivesoftware.smack.XMPPException - if an XMPP protocol error was received.java.lang.InterruptedException - if the calling thread was interrupted.