public final class VCardManager extends Manager
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ELEMENT |
static java.lang.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
public static final java.lang.String NAMESPACE
public static final java.lang.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, java.lang.InterruptedException
isSupported(Jid)
instead.jid
- connection
- XMPPException.XMPPErrorException
SmackException.NoResponseException
SmackException.NotConnectedException
java.lang.InterruptedException
public void saveVCard(VCard vcard) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
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
java.lang.InterruptedException
public VCard loadVCard() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
XMPPException.XMPPErrorException
SmackException.NoResponseException
SmackException.NotConnectedException
java.lang.InterruptedException
public VCard loadVCard(EntityBareJid bareJid) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
XMPPException.XMPPErrorException
SmackException.NoResponseException
- if there was no response from the server.SmackException.NotConnectedException
java.lang.InterruptedException
public boolean isSupported(Jid jid) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
jid
- XMPPException.XMPPErrorException
SmackException.NoResponseException
SmackException.NotConnectedException
java.lang.InterruptedException