de.geomobile.joined.api.client
Class AbstractJoinedClient

java.lang.Object
  extended by de.geomobile.joined.api.client.AbstractJoinedClient
Direct Known Subclasses:
JoinedClient

public abstract class AbstractJoinedClient
extends Object

This class is the base class for the JoinedClient implementation.


Constructor Summary
AbstractJoinedClient()
           
 
Method Summary
abstract  void acceptFriend(User user, Friend friend)
          This method accepts the friend invitation of another user.
abstract  void addFriend(User user, Friend friend)
          This methods sends a friends invitation to another user.
abstract  void delete(User user)
          This methods deletes an existing user at the Joined server.
abstract  void deleteFriend(User user, Friend friend)
          This method deletes a friend from the list of friends.
abstract  void deleteMessages(User user)
          This methods deletes all messages in the inbox of the logged in user.
abstract  List<Friend> getFriends(User user)
          This method get the friends of an user from the Joined server.
abstract  List<Message> getMessages(User user)
          This method returns a list of all available message from the inbox of the logged in user.
abstract  User login(String username, String password)
          This methods enables users to login at the Joined server.
abstract  void logout(User user)
          This methods enables users to logout at the Joined server.
abstract  User register(String username, String password)
          This methods creates a new user at the Joined server.
abstract  List<Friend> searchFriends(User user, String nickname)
          This method searches other users at the Joined server.
abstract  void sendMessage(User user, Friend friend, String message)
          This methods sends a text message to a friend.
abstract  void updatePosition(User user, double latitude, double longitude)
          This methods updates the position of the user at the Joined server.
abstract  void updateStatus(User user, boolean active)
          This method updates the status of the user at the Joined server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractJoinedClient

public AbstractJoinedClient()
Method Detail

register

public abstract User register(String username,
                              String password)
                       throws FriendFinderHTTPException,
                              FriendFinderUnexpectedException,
                              FriendFinderServerException,
                              FriendFinderConflictException
This methods creates a new user at the Joined server.

Parameters:
username - The name for the new user.
password - The password for the new user.
Returns:
The User object that represents the logged in user.
Throws:
FriendFinderHTTPException
FriendFinderUnexpectedException
FriendFinderServerException
FriendFinderConflictException

delete

public abstract void delete(User user)
                     throws FriendFinderHTTPException,
                            FriendFinderUnexpectedException,
                            FriendFinderServerException,
                            FriendFinderConflictException
This methods deletes an existing user at the Joined server.

Parameters:
user - The User object that represents the logged in user.
Throws:
FriendFinderHTTPException
FriendFinderUnexpectedException
FriendFinderServerException
FriendFinderConflictException

login

public abstract User login(String username,
                           String password)
                    throws FriendFinderHTTPException,
                           FriendFinderServerException,
                           FriendFinderUnexpectedException,
                           FriendFinderLoginException
This methods enables users to login at the Joined server.

Parameters:
username - The name of the user.
password - The password of the user.
Returns:
The User object that represents the logged in user.
Throws:
FriendFinderHTTPException
FriendFinderServerException
FriendFinderUnexpectedException
FriendFinderLoginException

logout

public abstract void logout(User user)
                     throws FriendFinderHTTPException,
                            FriendFinderServerException,
                            FriendFinderUnexpectedException,
                            FriendFinderLoginException
This methods enables users to logout at the Joined server.

Parameters:
user - The User object that represents the logged in user.
Throws:
FriendFinderHTTPException
FriendFinderServerException
FriendFinderUnexpectedException
FriendFinderLoginException

updatePosition

public abstract void updatePosition(User user,
                                    double latitude,
                                    double longitude)
                             throws FriendFinderHTTPException,
                                    FriendFinderServerException,
                                    FriendFinderUnexpectedException,
                                    FriendFinderLoginException
This methods updates the position of the user at the Joined server.

Parameters:
user - The User object that represents the logged in user.
latitude - The position of the user (latitude coordinate).
longitude - The position of the user (longitude coordinate).
Throws:
FriendFinderHTTPException
FriendFinderServerException
FriendFinderUnexpectedException
FriendFinderLoginException

updateStatus

public abstract void updateStatus(User user,
                                  boolean active)
                           throws FriendFinderHTTPException,
                                  FriendFinderServerException,
                                  FriendFinderUnexpectedException,
                                  FriendFinderLoginException
This method updates the status of the user at the Joined server.

Parameters:
user - The User object that represents the logged in user.
active - The status of the user (true for active and visible, false for inactive and invisible).
Throws:
FriendFinderHTTPException
FriendFinderServerException
FriendFinderUnexpectedException
FriendFinderLoginException

getFriends

public abstract List<Friend> getFriends(User user)
                                 throws FriendFinderHTTPException,
                                        FriendFinderServerException,
                                        FriendFinderUnexpectedException,
                                        FriendFinderLoginException
This method get the friends of an user from the Joined server.

Parameters:
user - The User object that represents the logged in user.
Returns:
A list of Friend objects, each representing one friend of the user.
Throws:
FriendFinderHTTPException
FriendFinderServerException
FriendFinderUnexpectedException
FriendFinderLoginException

searchFriends

public abstract List<Friend> searchFriends(User user,
                                           String nickname)
                                    throws FriendFinderHTTPException,
                                           FriendFinderServerException,
                                           FriendFinderUnexpectedException,
                                           FriendFinderLoginException
This method searches other users at the Joined server.

Parameters:
user - The User object that represents the logged in user.
nickname - The nickname other users.
Returns:
A list of Friend objects.
Throws:
FriendFinderHTTPException
FriendFinderServerException
FriendFinderUnexpectedException
FriendFinderLoginException

addFriend

public abstract void addFriend(User user,
                               Friend friend)
                        throws FriendFinderHTTPException,
                               FriendFinderServerException,
                               FriendFinderUnexpectedException,
                               FriendFinderLoginException,
                               FriendFinderSourceException
This methods sends a friends invitation to another user. If the other user accepts the invitation, the user appears at the list of friends.

Parameters:
user - The User object that represents the logged in user.
friend - The Friend object that represents the other user.
Throws:
FriendFinderHTTPException
FriendFinderServerException
FriendFinderUnexpectedException
FriendFinderLoginException
FriendFinderSourceException

acceptFriend

public abstract void acceptFriend(User user,
                                  Friend friend)
                           throws FriendFinderHTTPException,
                                  FriendFinderServerException,
                                  FriendFinderUnexpectedException,
                                  FriendFinderLoginException
This method accepts the friend invitation of another user.

Parameters:
user - The User object that represents the logged in user.
friend - The Friend object that represents the other user.
Throws:
FriendFinderHTTPException
FriendFinderServerException
FriendFinderUnexpectedException
FriendFinderLoginException

deleteFriend

public abstract void deleteFriend(User user,
                                  Friend friend)
                           throws FriendFinderHTTPException,
                                  FriendFinderServerException,
                                  FriendFinderUnexpectedException,
                                  FriendFinderLoginException
This method deletes a friend from the list of friends.

Parameters:
user - The User object that represents the logged in user.
friend - The User object that represents the other user.
Throws:
FriendFinderHTTPException
FriendFinderServerException
FriendFinderUnexpectedException
FriendFinderLoginException

sendMessage

public abstract void sendMessage(User user,
                                 Friend friend,
                                 String message)
                          throws FriendFinderHTTPException,
                                 FriendFinderServerException,
                                 FriendFinderUnexpectedException,
                                 FriendFinderLoginException
This methods sends a text message to a friend.

Parameters:
user - The User object that represents the logged in user.
friend - The Friend object that represents the friend.
message - The text message.
Throws:
FriendFinderHTTPException
FriendFinderServerException
FriendFinderUnexpectedException
FriendFinderLoginException

getMessages

public abstract List<Message> getMessages(User user)
                                   throws FriendFinderHTTPException,
                                          FriendFinderServerException,
                                          FriendFinderUnexpectedException,
                                          FriendFinderLoginException
This method returns a list of all available message from the inbox of the logged in user.

Parameters:
user - The User object that represents the logged in user.
Returns:
A list of Message objects, each representing a message from the inbox of the logged in user.
Throws:
FriendFinderHTTPException
FriendFinderServerException
FriendFinderUnexpectedException
FriendFinderLoginException

deleteMessages

public abstract void deleteMessages(User user)
                             throws FriendFinderHTTPException,
                                    FriendFinderServerException,
                                    FriendFinderUnexpectedException,
                                    FriendFinderLoginException
This methods deletes all messages in the inbox of the logged in user.

Parameters:
user - The User object that represents the logged in user.
Throws:
FriendFinderHTTPException
FriendFinderServerException
FriendFinderUnexpectedException
FriendFinderLoginException


Copyright © 2012 GeoMobile GmbH. All Rights Reserved.