de.geomobile.joined.api.client
Class JoinedClient

java.lang.Object
  extended by de.geomobile.joined.api.client.AbstractJoinedClient
      extended by de.geomobile.joined.api.client.JoinedClient

public class JoinedClient
extends AbstractJoinedClient

This class contains various methods for accessing the Joined server.


Method Summary
 void acceptFriend(User user, Friend friend)
          This method accepts the friend invitation of another user.
 void addFriend(User user, Friend friend)
          This methods sends a friends invitation to another user.
static JoinedClient createJoinedClient(String pJoinedServerUrl, String joinedSecretSalt)
          This methods enables users to create an easy to use client for the Joined server.
 void delete(User user)
          This methods deletes an existing user at the Joined server.
 void deleteFriend(User user, Friend friend)
          This method deletes a friend from the list of friends.
 void deleteMessages(User user)
          This methods deletes all messages in the inbox of the logged in user.
 List<Friend> getFriends(User user)
          This method get the friends of an user from the Joined server.
 List<Message> getMessages(User user)
          This method returns a list of all available message from the inbox of the logged in user.
 User login(String username, String password)
          This methods enables users to login at the Joined server.
 void logout(User user)
          This methods enables users to logout at the Joined server.
 User register(String username, String password)
          This methods creates a new user at the Joined server.
 List<Friend> searchFriends(User user, String nickname)
          This method searches other users at the Joined server.
 void sendMessage(User user, Friend friend, String message)
          This methods sends a text message to a friend.
 void updatePosition(User user, double latitude, double longitude)
          This methods updates the position of the user at the Joined server.
 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
 

Method Detail

createJoinedClient

public static JoinedClient createJoinedClient(String pJoinedServerUrl,
                                              String joinedSecretSalt)
This methods enables users to create an easy to use client for the Joined server.

Parameters:
pJoinedServerUrl - The URL of the Joined server.
joinedSecretSalt - The secret salt for accessing the Joined server.
Returns:

register

public User register(String username,
                     String password)
              throws FriendFinderHTTPException,
                     FriendFinderUnexpectedException,
                     FriendFinderServerException,
                     FriendFinderConflictException
Description copied from class: AbstractJoinedClient
This methods creates a new user at the Joined server.

Specified by:
register in class AbstractJoinedClient
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 void delete(User user)
            throws FriendFinderHTTPException,
                   FriendFinderUnexpectedException,
                   FriendFinderServerException,
                   FriendFinderConflictException
Description copied from class: AbstractJoinedClient
This methods deletes an existing user at the Joined server.

Specified by:
delete in class AbstractJoinedClient
Parameters:
user - The User object that represents the logged in user.
Throws:
FriendFinderHTTPException
FriendFinderUnexpectedException
FriendFinderServerException
FriendFinderConflictException

logout

public void logout(User user)
            throws FriendFinderHTTPException,
                   FriendFinderServerException,
                   FriendFinderUnexpectedException,
                   FriendFinderLoginException
Description copied from class: AbstractJoinedClient
This methods enables users to logout at the Joined server.

Specified by:
logout in class AbstractJoinedClient
Parameters:
user - The User object that represents the logged in user.
Throws:
FriendFinderHTTPException
FriendFinderServerException
FriendFinderUnexpectedException
FriendFinderLoginException

login

public User login(String username,
                  String password)
           throws FriendFinderHTTPException,
                  FriendFinderServerException,
                  FriendFinderUnexpectedException,
                  FriendFinderLoginException
Description copied from class: AbstractJoinedClient
This methods enables users to login at the Joined server.

Specified by:
login in class AbstractJoinedClient
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

updatePosition

public void updatePosition(User user,
                           double latitude,
                           double longitude)
                    throws FriendFinderHTTPException,
                           FriendFinderServerException,
                           FriendFinderUnexpectedException,
                           FriendFinderLoginException
Description copied from class: AbstractJoinedClient
This methods updates the position of the user at the Joined server.

Specified by:
updatePosition in class AbstractJoinedClient
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 void updateStatus(User user,
                         boolean active)
                  throws FriendFinderHTTPException,
                         FriendFinderServerException,
                         FriendFinderUnexpectedException,
                         FriendFinderLoginException
Description copied from class: AbstractJoinedClient
This method updates the status of the user at the Joined server.

Specified by:
updateStatus in class AbstractJoinedClient
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 List<Friend> getFriends(User user)
                        throws FriendFinderHTTPException,
                               FriendFinderServerException,
                               FriendFinderUnexpectedException,
                               FriendFinderLoginException
Description copied from class: AbstractJoinedClient
This method get the friends of an user from the Joined server.

Specified by:
getFriends in class AbstractJoinedClient
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 List<Friend> searchFriends(User user,
                                  String nickname)
                           throws FriendFinderHTTPException,
                                  FriendFinderServerException,
                                  FriendFinderUnexpectedException,
                                  FriendFinderLoginException
Description copied from class: AbstractJoinedClient
This method searches other users at the Joined server.

Specified by:
searchFriends in class AbstractJoinedClient
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 void addFriend(User user,
                      Friend friend)
               throws FriendFinderHTTPException,
                      FriendFinderServerException,
                      FriendFinderUnexpectedException,
                      FriendFinderLoginException,
                      FriendFinderSourceException
Description copied from class: AbstractJoinedClient
This methods sends a friends invitation to another user. If the other user accepts the invitation, the user appears at the list of friends.

Specified by:
addFriend in class AbstractJoinedClient
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 void acceptFriend(User user,
                         Friend friend)
                  throws FriendFinderHTTPException,
                         FriendFinderServerException,
                         FriendFinderUnexpectedException,
                         FriendFinderLoginException
Description copied from class: AbstractJoinedClient
This method accepts the friend invitation of another user.

Specified by:
acceptFriend in class AbstractJoinedClient
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 void deleteFriend(User user,
                         Friend friend)
                  throws FriendFinderHTTPException,
                         FriendFinderServerException,
                         FriendFinderUnexpectedException,
                         FriendFinderLoginException
Description copied from class: AbstractJoinedClient
This method deletes a friend from the list of friends.

Specified by:
deleteFriend in class AbstractJoinedClient
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 void sendMessage(User user,
                        Friend friend,
                        String message)
                 throws FriendFinderHTTPException,
                        FriendFinderServerException,
                        FriendFinderUnexpectedException,
                        FriendFinderLoginException
Description copied from class: AbstractJoinedClient
This methods sends a text message to a friend.

Specified by:
sendMessage in class AbstractJoinedClient
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 List<Message> getMessages(User user)
                          throws FriendFinderHTTPException,
                                 FriendFinderServerException,
                                 FriendFinderUnexpectedException,
                                 FriendFinderLoginException
Description copied from class: AbstractJoinedClient
This method returns a list of all available message from the inbox of the logged in user.

Specified by:
getMessages in class AbstractJoinedClient
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 void deleteMessages(User user)
                    throws FriendFinderHTTPException,
                           FriendFinderServerException,
                           FriendFinderUnexpectedException,
                           FriendFinderLoginException
Description copied from class: AbstractJoinedClient
This methods deletes all messages in the inbox of the logged in user.

Specified by:
deleteMessages in class AbstractJoinedClient
Parameters:
user - The User object that represents the logged in user.
Throws:
FriendFinderHTTPException
FriendFinderServerException
FriendFinderUnexpectedException
FriendFinderLoginException


Copyright © 2012 GeoMobile GmbH. All Rights Reserved.