ymsg.network
Class YahooUser

Object
  extended byYahooUser

public class YahooUser
extends Object

Represents a single Yahoo user that the API knows about. This may be because they are on our friends list, because they are on our ignored list - or just because they are someone we encountered as part of a conference session, or they tried to add us to their friends list.

Not all fields will be filled out. Yahoo often does not give full info on every Yahoo id included in its packets - but there should always be sufficient data to do the task at hand, whether that be sending messages to a conference, refusing a contact request, etc.

Yahoo does not give update information for users a session is not in direct contact with. If we leave a chat room, for example, the YahooUser objects for its visitors will no longer be updated - unless they are also reachable via another route, for example if they are on our friends list.

Since:
1.0

Constructor Summary
YahooUser()
           
 
Method Summary
 String getCustomStatusMessage()
          Returns this user's custom status message.
 String getId()
          Returns the Yahoo ID of this user.
 long getStatus()
          Returns the status of this user.
 boolean isCustomBusy()
          Returns whether this user's custom status is 'busy'.
 boolean isFriend()
          Returns true if this user is in one or more of the session's Friends groups.
 boolean isIgnored()
          Returns whether messages from this user are currently ignored.
 boolean isLoggedIn()
          Returns whether this user is logged into Yahoo.
 boolean isOnChat()
          Returns whether this user is accessing Yahoo via the chat system.
 boolean isOnPager()
          Returns whether this user is accessing Yahoo via the pager (Instant Messager) system.
 String toString()
          Returns a string representation of this object.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

YahooUser

public YahooUser()
Method Detail

getId

public String getId()
Returns the Yahoo ID of this user.

Returns:
ID of user.
Since:
1.0

getStatus

public long getStatus()
Returns the status of this user. See the StatusConstants interface for meanings.

Returns:
current status
Since:
1.0

isOnChat

public boolean isOnChat()
Returns whether this user is accessing Yahoo via the chat system.

Returns:
true if they are, false if not.
Since:
1.0

isOnPager

public boolean isOnPager()
Returns whether this user is accessing Yahoo via the pager (Instant Messager) system.

Returns:
true if they are, false if not.
Since:
1.0

isLoggedIn

public boolean isLoggedIn()
Returns whether this user is logged into Yahoo. To be logged into Yahoo they must either be present on chat or pager.

Returns:
true if they are, false if not.
Since:
1.0

isIgnored

public boolean isIgnored()
Returns whether messages from this user are currently ignored. This API does not actually filter messages itself (although this option could be added at a later date) so it is left to the API user to check the isIgnored status of each user from whom it gets a message.

Returns:
true if they are, false if not.
Since:
1.0

getCustomStatusMessage

public String getCustomStatusMessage()
Returns this user's custom status message. If this user does not currently have custom status set, then this method returns null.

Returns:
custom status message, or null
Since:
1.0

isCustomBusy

public boolean isCustomBusy()
Returns whether this user's custom status is 'busy'. The result from this method should only be considered valid if the user actually has a custom status set.

Returns:
true if they are, false if not.
Since:
1.0

isFriend

public boolean isFriend()
Returns true if this user is in one or more of the session's Friends groups.

Returns:
true if they are, false if not.
Since:
1.0

toString

public String toString()
Returns a string representation of this object.

Returns:
user as a string
Since:
1.0