Пример #1
0
  public void refreshFriends() {
    friends = H4J.getDAO().getMessengerDAO().loadFriends(user);

    Session session = H4J.getNetwork().getSessionManager().getSessionById(user.getId());
    session.respond(InitializeMessengerMessageComposer.compose(friends));
  }
Пример #2
0
  public void refreshRequests() {
    requests = H4J.getDAO().getMessengerDAO().loadRequests(user);

    Session session = H4J.getNetwork().getSessionManager().getSessionById(user.getId());
    session.respond(SendPendingFriendRequestsMessageComposer.compose(requests));
  }
Пример #3
0
 public MessengerManager(User user) {
   friends = H4J.getDAO().getMessengerDAO().loadFriends(user);
   requests = H4J.getDAO().getMessengerDAO().loadRequests(user);
   this.user = user;
 }