public class UserService extends CharmService
gluonClient
Constructor and Description |
---|
UserService(GluonClient gluonClient)
Construct a new UserService.
|
Modifier and Type | Method and Description |
---|---|
void |
retrieveFriends(java.util.function.BiConsumer<CharmObservable.State,javafx.collections.ObservableList<User>> consumer)
Retrieve the list of friends for the current authenticated user.
|
CharmObservableObject<User> |
retrieveUser(java.lang.String id)
Retrieve the information of the user with the specified id.
|
getGluonClient
public UserService(GluonClient gluonClient)
gluonClient
- The GluonClient instance used to connect with Gluon
Cloud.public void retrieveFriends(java.util.function.BiConsumer<CharmObservable.State,javafx.collections.ObservableList<User>> consumer)
Worker
. The provided
consumer
will be called whenever the state of the background
worker changes. When the state is equal to
SUCCEEDED
, it is safe to process the
second parameter of the consumer as well.consumer
- BiConsumer function that will be called whenever the
state of the background worker changes.public CharmObservableObject<User> retrieveUser(java.lang.String id)
id
- the id of the user to look up.