Class VCardManager
java.lang.Object
org.jivesoftware.smack.Manager
org.jivesoftware.smackx.vcardtemp.VCardManager
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic VCardManager
getInstanceFor
(XMPPConnection connection) Retrieves aVCardManager
for the specifiedXMPPConnection
, 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.Load the VCard of the current user.loadVCard
(EntityBareJid bareJid) Load VCard information for a given user.void
Save this vCard for the user connected by 'connection'.Methods inherited from class org.jivesoftware.smack.Manager
connection, getAuthenticatedConnectionOrThrow, schedule, schedule, scheduleBlocking
-
Field Details
-
NAMESPACE
- See Also:
-
ELEMENT
- See Also:
-
-
Method Details
-
getInstanceFor
Retrieves aVCardManager
for the specifiedXMPPConnection
, creating one if it doesn't already exist.- Parameters:
connection
- the connection the manager is attached to.- Returns:
- The new or existing manager.
-
isSupported
@Deprecated public static boolean isSupported(Jid jid, XMPPConnection connection) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException Deprecated.useisSupported(Jid)
instead.Returns true if the given entity understands the vCard-XML format and allows the exchange of such.- Parameters:
jid
- TODO javadoc me pleaseconnection
- TODO javadoc me please- Returns:
- true if the given entity understands the vCard-XML format and exchange.
- Throws:
XMPPException.XMPPErrorException
- if there was an XMPP error returned.SmackException.NoResponseException
- if there was no response from the remote entity.SmackException.NotConnectedException
- if the XMPP connection is not connected.InterruptedException
- if the calling thread was interrupted.
-
saveVCard
public void saveVCard(VCard vcard) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException Save this vCard for the user connected by 'connection'. XMPPConnection should be authenticated and not anonymous.- Parameters:
vcard
- VCard.- Throws:
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
- if the XMPP connection is not connected.InterruptedException
- if the calling thread was interrupted.
-
loadVCard
public VCard loadVCard() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedExceptionLoad the VCard of the current user.- Returns:
- VCard.
- Throws:
XMPPException.XMPPErrorException
- if there was an XMPP error returned.SmackException.NoResponseException
- if there was no response from the remote entity.SmackException.NotConnectedException
- if the XMPP connection is not connected.InterruptedException
- if the calling thread was interrupted.
-
loadVCard
public VCard loadVCard(EntityBareJid bareJid) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException Load VCard information for a given user.- Parameters:
bareJid
- bareJid of the user.- Returns:
- VCard.
- Throws:
XMPPException.XMPPErrorException
- if there was an XMPP error returned.SmackException.NoResponseException
- if there was no response from the server.SmackException.NotConnectedException
- if the XMPP connection is not connected.InterruptedException
- if the calling thread was interrupted.
-
isSupported
public boolean isSupported(Jid jid) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException Returns true if the given entity understands the vCard-XML format and allows the exchange of such.- Parameters:
jid
- TODO javadoc me please- Returns:
- true if the given entity understands the vCard-XML format and exchange.
- Throws:
XMPPException.XMPPErrorException
- if there was an XMPP error returned.SmackException.NoResponseException
- if there was no response from the remote entity.SmackException.NotConnectedException
- if the XMPP connection is not connected.InterruptedException
- if the calling thread was interrupted.
-
isSupported(Jid)
instead.