Class VCardManager

java.lang.Object
org.jivesoftware.smack.Manager
org.jivesoftware.smackx.vcardtemp.VCardManager

public final class VCardManager extends org.jivesoftware.smack.Manager
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    getInstanceFor(org.jivesoftware.smack.XMPPConnection connection)
    Retrieves a VCardManager for the specified XMPPConnection, creating one if it doesn't already exist.
    boolean
    isSupported(org.jxmpp.jid.Jid jid)
    Returns true if the given entity understands the vCard-XML format and allows the exchange of such.
    static boolean
    isSupported(org.jxmpp.jid.Jid jid, org.jivesoftware.smack.XMPPConnection connection)
    Deprecated.
    use isSupported(Jid) instead.
    Load the VCard of the current user.
    loadVCard(org.jxmpp.jid.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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Method Details

    • getInstanceFor

      public static VCardManager getInstanceFor(org.jivesoftware.smack.XMPPConnection connection)
      Retrieves a VCardManager for the specified XMPPConnection, 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(org.jxmpp.jid.Jid jid, org.jivesoftware.smack.XMPPConnection connection) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Deprecated.
      use isSupported(Jid) instead.
      Returns true if the given entity understands the vCard-XML format and allows the exchange of such.
      Parameters:
      jid - TODO javadoc me please
      connection - TODO javadoc me please
      Returns:
      true if the given entity understands the vCard-XML format and exchange.
      Throws:
      org.jivesoftware.smack.XMPPException.XMPPErrorException - if there was an XMPP error returned.
      org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the remote entity.
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      InterruptedException - if the calling thread was interrupted.
    • saveVCard

      public void saveVCard(VCard vcard) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Save this vCard for the user connected by 'connection'. XMPPConnection should be authenticated and not anonymous.
      Parameters:
      vcard - VCard.
      Throws:
      org.jivesoftware.smack.XMPPException.XMPPErrorException - thrown if there was an issue setting the VCard in the server.
      org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the server.
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      InterruptedException - if the calling thread was interrupted.
    • loadVCard

      public VCard loadVCard() throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Load the VCard of the current user.
      Returns:
      VCard.
      Throws:
      org.jivesoftware.smack.XMPPException.XMPPErrorException - if there was an XMPP error returned.
      org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the remote entity.
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      InterruptedException - if the calling thread was interrupted.
    • loadVCard

      public VCard loadVCard(org.jxmpp.jid.EntityBareJid bareJid) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Load VCard information for a given user.
      Parameters:
      bareJid - bareJid of the user.
      Returns:
      VCard.
      Throws:
      org.jivesoftware.smack.XMPPException.XMPPErrorException - if there was an XMPP error returned.
      org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the server.
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      InterruptedException - if the calling thread was interrupted.
    • isSupported

      public boolean isSupported(org.jxmpp.jid.Jid jid) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.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:
      org.jivesoftware.smack.XMPPException.XMPPErrorException - if there was an XMPP error returned.
      org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the remote entity.
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      InterruptedException - if the calling thread was interrupted.