public class STUN extends 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.
|
IQ.IQChildElementXmlStringBuilder, IQ.Type
Modifier and Type | Field and Description |
---|---|
static String |
DOMAIN
Element name of the stanza extension.
|
static String |
ELEMENT_NAME
Element name of the stanza extension.
|
static String |
NAMESPACE
Namespace of the stanza extension.
|
IQ_ELEMENT, QUERY_ELEMENT
DEFAULT_LANGUAGE, ITEM, language, TEXT
Constructor and Description |
---|
STUN()
Creates a STUN IQ.
|
Modifier and Type | Method and Description |
---|---|
String |
getPublicIp()
Get Public Ip returned from the XMPP server.
|
List<STUN.StunServerAddress> |
getServers()
Get a list of STUN Servers recommended by the Server.
|
static STUN |
getSTUNServer(XMPPConnection connection)
Get a new STUN Server Address and port from the server.
|
static boolean |
serviceAvailable(XMPPConnection connection)
Check if the server support STUN Service.
|
getIQChildElementBuilder
createErrorResponse, createErrorResponse, createErrorResponse, createResultIQ, getChildElementName, getChildElementNamespace, getChildElementXML, getChildElementXML, getType, initializeAsResultFor, initialzeAsResultFor, isRequestIQ, setType, toString, toXML
addCommonAttributes, addExtension, addExtensions, appendErrorIfExists, getDefaultLanguage, getError, getExtension, getExtension, getExtensions, getExtensions, getFrom, getLanguage, getPacketID, getStanzaId, getTo, hasExtension, hasExtension, hasStanzaIdSet, logCommonAttributes, overrideExtension, removeExtension, removeExtension, setError, setError, setFrom, setFrom, setLanguage, setPacketID, setStanzaId, setStanzaId, setTo, setTo
public static final String DOMAIN
public static final String ELEMENT_NAME
public static final String NAMESPACE
public STUN()
public List<STUN.StunServerAddress> getServers()
public String getPublicIp()
public static STUN getSTUNServer(XMPPConnection connection) throws SmackException.NotConnectedException, InterruptedException
connection
- SmackException.NotConnectedException
InterruptedException
public static boolean serviceAvailable(XMPPConnection connection) throws XMPPException, SmackException, InterruptedException
connection
- the connectionSmackException
XMPPException
InterruptedException