public final class VCardManager extends Manager
Modifier and Type | Field and Description |
---|---|
static String |
ELEMENT |
static String |
NAMESPACE |
Modifier and Type | Method and Description |
---|---|
static VCardManager |
getInstanceFor(XMPPConnection connection)
Retrieves a
VCardManager for the specified XMPPConnection , creating one if it doesn't already
exist. |
boolean |
isSupported(Jid jid)
Returns true if the given entity understands the vCard-XML format and allows the exchange of such.
|
static boolean |
isSupported(Jid jid,
XMPPConnection connection)
Deprecated.
use
isSupported(Jid) instead. |
VCard |
loadVCard()
Load the VCard of the current user.
|
VCard |
loadVCard(EntityBareJid bareJid)
Load VCard information for a given user.
|
void |
saveVCard(VCard vcard)
Save this vCard for the user connected by 'connection'.
|
connection, getAuthenticatedConnectionOrThrow, schedule
public static final String NAMESPACE
public static final String ELEMENT
public static VCardManager getInstanceFor(XMPPConnection connection)
VCardManager
for the specified XMPPConnection
, creating one if it doesn't already
exist.connection
- the connection the manager is attached to.@Deprecated public static boolean isSupported(Jid jid, XMPPConnection connection) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
isSupported(Jid)
instead.jid
- connection
- XMPPException.XMPPErrorException
SmackException.NoResponseException
SmackException.NotConnectedException
InterruptedException
public void saveVCard(VCard vcard) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
vcard
- VCard.XMPPException.XMPPErrorException
- thrown if there was an issue setting the VCard in the server.SmackException.NoResponseException
- if there was no response from the server.SmackException.NotConnectedException
InterruptedException
public VCard loadVCard() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
public VCard loadVCard(EntityBareJid bareJid) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
bareJid
- bareJid of the user.XMPPException.XMPPErrorException
SmackException.NoResponseException
- if there was no response from the server.SmackException.NotConnectedException
InterruptedException
public boolean isSupported(Jid jid) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
jid
- XMPPException.XMPPErrorException
SmackException.NoResponseException
SmackException.NotConnectedException
InterruptedException