public class XmppUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static org.jivesoftware.smack.packet.Packet |
discoveryRequest(org.jivesoftware.smack.XMPPConnection conn) |
static org.jivesoftware.smack.packet.RosterPacket |
extendedRoster(org.jivesoftware.smack.XMPPConnection conn) |
static String |
extractFrom(Document doc) |
static String |
extractSdp(Document doc) |
static Collection<InetSocketAddress> |
extractStunServers(String xml)
Extracts STUN servers from a response from Google Talk containing
those servers.
|
static long |
extractTransactionId(Document doc) |
static org.jivesoftware.smack.ConnectionConfiguration |
getGlobalConfig() |
static org.jivesoftware.smack.ConnectionConfiguration |
getGlobalProxyConfig() |
static org.jivesoftware.smack.packet.Packet |
getOtr(org.jivesoftware.smack.XMPPConnection conn) |
static org.jivesoftware.smack.packet.Packet |
getSharedStatus(org.jivesoftware.smack.XMPPConnection conn) |
static org.jivesoftware.smackx.packet.VCard |
getVCard(org.jivesoftware.smack.XMPPConnection conn,
String emailId) |
static org.jivesoftware.smack.packet.Packet |
goOffTheRecord(String jidToOtr,
org.jivesoftware.smack.XMPPConnection conn) |
static Collection<InetSocketAddress> |
googleStunServers(org.jivesoftware.smack.XMPPConnection conn) |
static org.jivesoftware.smack.packet.Packet |
goOnTheRecord(String jidToOtr,
org.jivesoftware.smack.XMPPConnection conn) |
static String |
jidToUser(String jid) |
static String |
jidToUser(org.jivesoftware.smack.XMPPConnection conn) |
static org.jivesoftware.smack.XMPPConnection |
persistentXmppConnection(String username,
String password,
String id,
int attempts) |
static org.jivesoftware.smack.XMPPConnection |
persistentXmppConnection(String username,
String password,
String id,
int attempts,
String host,
int port,
String serviceName,
XmppP2PClient clientListener) |
static org.jivesoftware.smack.XMPPConnection |
persistentXmppConnection(XmppCredentials credentials,
int attempts,
String host,
int port,
String serviceName,
XmppP2PClient clientListener) |
static void |
printMessage(org.jivesoftware.smack.packet.Packet msg) |
static void |
setGlobalConfig(org.jivesoftware.smack.ConnectionConfiguration config) |
static void |
setGlobalProxyConfig(org.jivesoftware.smack.ConnectionConfiguration config) |
static void |
setGoogleTalkInvisible(org.jivesoftware.smack.XMPPConnection conn,
String to)
Note we don't even need to set this property to maintain compatibility
with Google Talk presence -- just sending them the shared status
message signifies we generally understand the protocol and allows us
to not clobber other clients' presences.
|
static org.jivesoftware.smack.XMPPConnection |
simpleGoogleTalkConnection(String username,
String password,
String id) |
static org.jivesoftware.smack.XMPPConnection |
simpleGoogleTalkConnection(XmppCredentials credentials) |
static String |
toString(org.jivesoftware.smack.packet.Packet msg) |
public static Collection<InetSocketAddress> extractStunServers(String xml)
xml - The XML with server data.public static long extractTransactionId(Document doc)
public static void printMessage(org.jivesoftware.smack.packet.Packet msg)
public static String toString(org.jivesoftware.smack.packet.Packet msg)
public static org.jivesoftware.smack.XMPPConnection persistentXmppConnection(String username, String password, String id, int attempts) throws IOException, CredentialException
IOExceptionCredentialExceptionpublic static org.jivesoftware.smack.XMPPConnection persistentXmppConnection(String username, String password, String id, int attempts, String host, int port, String serviceName, XmppP2PClient clientListener) throws IOException, CredentialException
IOExceptionCredentialExceptionpublic static org.jivesoftware.smack.XMPPConnection persistentXmppConnection(XmppCredentials credentials, int attempts, String host, int port, String serviceName, XmppP2PClient clientListener) throws IOException, CredentialException
IOExceptionCredentialExceptionpublic static void setGlobalConfig(org.jivesoftware.smack.ConnectionConfiguration config)
public static org.jivesoftware.smack.ConnectionConfiguration getGlobalConfig()
public static void setGlobalProxyConfig(org.jivesoftware.smack.ConnectionConfiguration config)
public static org.jivesoftware.smack.ConnectionConfiguration getGlobalProxyConfig()
public static org.jivesoftware.smack.XMPPConnection simpleGoogleTalkConnection(String username, String password, String id) throws CredentialException, org.jivesoftware.smack.XMPPException, IOException
CredentialExceptionorg.jivesoftware.smack.XMPPExceptionIOExceptionpublic static org.jivesoftware.smack.XMPPConnection simpleGoogleTalkConnection(XmppCredentials credentials) throws CredentialException, org.jivesoftware.smack.XMPPException, IOException
CredentialExceptionorg.jivesoftware.smack.XMPPExceptionIOExceptionpublic static String jidToUser(org.jivesoftware.smack.XMPPConnection conn)
public static org.jivesoftware.smackx.packet.VCard getVCard(org.jivesoftware.smack.XMPPConnection conn,
String emailId)
throws org.jivesoftware.smack.XMPPException
org.jivesoftware.smack.XMPPExceptionpublic static org.jivesoftware.smack.packet.Packet goOffTheRecord(String jidToOtr, org.jivesoftware.smack.XMPPConnection conn)
public static org.jivesoftware.smack.packet.Packet goOnTheRecord(String jidToOtr, org.jivesoftware.smack.XMPPConnection conn)
public static org.jivesoftware.smack.packet.Packet getOtr(org.jivesoftware.smack.XMPPConnection conn)
public static org.jivesoftware.smack.packet.Packet getSharedStatus(org.jivesoftware.smack.XMPPConnection conn)
public static org.jivesoftware.smack.packet.RosterPacket extendedRoster(org.jivesoftware.smack.XMPPConnection conn)
public static Collection<InetSocketAddress> googleStunServers(org.jivesoftware.smack.XMPPConnection conn)
public static org.jivesoftware.smack.packet.Packet discoveryRequest(org.jivesoftware.smack.XMPPConnection conn)
public static void setGoogleTalkInvisible(org.jivesoftware.smack.XMPPConnection conn,
String to)
conn - to - Copyright © 2013 LittleShoot. All Rights Reserved.