public class STUN
extends org.jivesoftware.smack.packet.IQ
| 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 packet extension.
|
static java.lang.String |
ELEMENT_NAME
Element name of the packet extension.
|
static java.lang.String |
NAMESPACE
Namespace of the packet extension.
|
| Constructor and Description |
|---|
STUN()
Creates a STUN IQ
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getChildElementXML()
Get the Child Element XML of the Packet
|
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, createResultIQ, getType, setType, toXMLaddCommonAttributes, addExtension, addExtensions, equals, getDefaultLanguage, getError, getExtension, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getTo, getXmlns, hashCode, nextID, removeExtension, setDefaultXmlns, setError, setFrom, setPacketID, setTo, toStringpublic 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 java.lang.String getChildElementXML()
getChildElementXML in class org.jivesoftware.smack.packet.IQpublic static STUN getSTUNServer(org.jivesoftware.smack.XMPPConnection connection) throws org.jivesoftware.smack.SmackException.NotConnectedException
connection - org.jivesoftware.smack.SmackException.NotConnectedExceptionpublic static boolean serviceAvailable(org.jivesoftware.smack.XMPPConnection connection)
throws org.jivesoftware.smack.XMPPException,
org.jivesoftware.smack.SmackException
connection - the connectionorg.jivesoftware.smack.SmackExceptionorg.jivesoftware.smack.XMPPException