Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.jabber
Class InfoRetreiver

java.lang.Object
  extended by net.java.sip.communicator.impl.protocol.jabber.InfoRetreiver

public class InfoRetreiver
extends Object

Handles and retrieves all info of our contacts or our account info

Author:
Damian Minkov

Nested Class Summary
static class InfoRetreiver.WorkDepartmentNameDetail
          Work department
static class InfoRetreiver.WorkFaxDetail
          Fax at work
static class InfoRetreiver.WorkPagerDetail
          Pager at work
 
Constructor Summary
protected InfoRetreiver(ProtocolProviderServiceJabberImpl jabberProvider, String ownerUin)
           
 
Method Summary
(package private)  List<ServerStoredDetails.GenericDetail> getCachedContactDetails(String contactAddress)
          request the full info for the given contactAddress if available in cache.
(package private)  List<ServerStoredDetails.GenericDetail> getContactDetails(String contactAddress)
          request the full info for the given contactAddress waits and return this details
(package private)  Iterator<ServerStoredDetails.GenericDetail> getDetails(String uin, Class<? extends ServerStoredDetails.GenericDetail> detailClass)
          returns the user details from the specified class exactly that class not its descendants
(package private)  Iterator<ServerStoredDetails.GenericDetail> getDetailsAndDescendants(String uin, Class<? extends ServerStoredDetails.GenericDetail> detailClass)
          returns the user details from the specified class or its descendants the class is one from the net.java.sip.communicator.service.protocol.ServerStoredDetails or implemented one in the operation set for the user info
 void load(org.jivesoftware.smackx.packet.VCard vcard, org.jivesoftware.smack.Connection connection, String user, long timeout)
          Load VCard for the given user.
protected  List<ServerStoredDetails.GenericDetail> retrieveDetails(String contactAddress)
          Retrieve details and return them or if missing return an empty list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InfoRetreiver

protected InfoRetreiver(ProtocolProviderServiceJabberImpl jabberProvider,
                        String ownerUin)
Method Detail

getDetailsAndDescendants

Iterator<ServerStoredDetails.GenericDetail> getDetailsAndDescendants(String uin,
                                                                     Class<? extends ServerStoredDetails.GenericDetail> detailClass)
returns the user details from the specified class or its descendants the class is one from the net.java.sip.communicator.service.protocol.ServerStoredDetails or implemented one in the operation set for the user info

Parameters:
uin - String
detailClass - Class
Returns:
Iterator

getDetails

Iterator<ServerStoredDetails.GenericDetail> getDetails(String uin,
                                                       Class<? extends ServerStoredDetails.GenericDetail> detailClass)
returns the user details from the specified class exactly that class not its descendants

Parameters:
uin - String
detailClass - Class
Returns:
Iterator

getContactDetails

List<ServerStoredDetails.GenericDetail> getContactDetails(String contactAddress)
request the full info for the given contactAddress waits and return this details

Parameters:
contactAddress - String
Returns:
Vector the details

retrieveDetails

protected List<ServerStoredDetails.GenericDetail> retrieveDetails(String contactAddress)
Retrieve details and return them or if missing return an empty list.

Parameters:
contactAddress - the address to search for.
Returns:
the details or empty list.

getCachedContactDetails

List<ServerStoredDetails.GenericDetail> getCachedContactDetails(String contactAddress)
request the full info for the given contactAddress if available in cache.

Parameters:
contactAddress - to search for
Returns:
list of the details if any.

load

public void load(org.jivesoftware.smackx.packet.VCard vcard,
                 org.jivesoftware.smack.Connection connection,
                 String user,
                 long timeout)
          throws org.jivesoftware.smack.XMPPException
Load VCard for the given user. Using the specified timeout.

Parameters:
vcard - VCard
connection - XMPP connection
user - the user
timeout - timeout in second
Throws:
org.jivesoftware.smack.XMPPException - if something went wrong during VCard loading

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.