com.jakeapp.jake.ics.users
Interface IUsersService

All Known Implementing Classes:
MockMsgAndStatusService

public interface IUsersService

provides abstraction to our friends-group

Author:
johannes

Method Summary
 void addUser(UserId user, java.lang.String name)
          idempotent add to communications group function
 java.lang.Iterable<UserId> getAllUsers()
           
 java.lang.String getNickName(UserId user)
          get the name associated with this user
 java.lang.Iterable<UserId> getUsers()
           
 boolean isCapable(UserId userid)
          blocking request for a online-status notification You should prefer requestOnlineNotification
 boolean isFriend(UserId xmppid)
          Is this special someone in our group?
 void registerOnlineStatusListener(IOnlineStatusListener onlineStatusListener)
          Registers a callback for the event that the userid goes online or offline
 void removeUser(UserId user)
          idempotent remove from communication group function
 void requestOnlineNotification(UserId userid)
          nonblocking request for a online-status notification
 

Method Detail

registerOnlineStatusListener

void registerOnlineStatusListener(IOnlineStatusListener onlineStatusListener)
Registers a callback for the event that the userid goes online or offline

Parameters:
onlineStatusListener - object to be called
Throws:
NoSuchUseridException - if the user does not exist

addUser

void addUser(UserId user,
             java.lang.String name)
             throws NoSuchUseridException,
                    NotLoggedInException,
                    java.io.IOException
idempotent add to communications group function

Parameters:
user -
name -
Throws:
NoSuchUseridException
NotLoggedInException
java.io.IOException

removeUser

void removeUser(UserId user)
                throws NotLoggedInException,
                       NoSuchUseridException,
                       java.io.IOException
idempotent remove from communication group function

Parameters:
user -
Throws:
NotLoggedInException
NoSuchUseridException
java.io.IOException

getUsers

java.lang.Iterable<UserId> getUsers()
                                    throws NotLoggedInException
Returns:
all user we could talk to, logged in or not
Throws:
NotLoggedInException

getAllUsers

java.lang.Iterable<UserId> getAllUsers()
                                       throws NotLoggedInException
Returns:
all user, also those that are not in our friends list
Throws:
NotLoggedInException

isFriend

boolean isFriend(UserId xmppid)
                 throws NotLoggedInException,
                        NoSuchUseridException
Is this special someone in our group?

Parameters:
xmppid -
Returns:
Throws:
NotLoggedInException
NoSuchUseridException

isCapable

boolean isCapable(UserId userid)
                  throws java.io.IOException,
                         NotLoggedInException,
                         NoSuchUseridException
blocking request for a online-status notification You should prefer requestOnlineNotification

Parameters:
userid -
Returns:
Throws:
java.io.IOException
NotLoggedInException
NoSuchUseridException

requestOnlineNotification

void requestOnlineNotification(UserId userid)
                               throws NotLoggedInException
nonblocking request for a online-status notification

Parameters:
userid -
Throws:
NotLoggedInException

getNickName

java.lang.String getNickName(UserId user)
                             throws NotLoggedInException
get the name associated with this user

Parameters:
user -
Returns:
the name as set by addUser, or an empty String
Throws:
NotLoggedInException


Copyright © 2011. All Rights Reserved.