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<javafx.concurrent.Worker.State,javafx.collections.ObservableList<User>> consumer)
Retrieve the list of friends for the current authenticated user.
|
void |
retrieveUser(java.lang.String id,
java.util.function.BiConsumer<javafx.concurrent.Worker.State,User> consumer)
Retrieve the information of the user with the specified id.
|
getGluonClientpublic UserService(GluonClient gluonClient)
gluonClient - The GluonClient instance used to connect with Gluon
Cloud.public void retrieveFriends(java.util.function.BiConsumer<javafx.concurrent.Worker.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 void retrieveUser(java.lang.String id,
java.util.function.BiConsumer<javafx.concurrent.Worker.State,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.id - the id of the user to look up.consumer - BiConsumer function that will be called whenever the
state of the background worker changes.