Ignore:
Timestamp:
09/22/20 08:52:08 (4 years ago)
Author:
bart
Message:

Version 1.5.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/geniusweb/profilesserver/websocket/ProfilesListSocket.java

    r8 r16  
    2525
    2626import geniusweb.profilesserver.Jackson;
    27 import geniusweb.profilesserver.ProfilesFactory;
     27import geniusweb.profilesserver.ProfilesRepository;
    2828import geniusweb.profilesserver.events.ChangeEvent;
    2929import tudelft.utilities.listener.Listener;
     
    3535 * and profiles. Every time something changes, a new list of domains and
    3636 * profiles is sent. For each new websocket the server will create one of this
    37  * but they all share one {@link ProfilesFactory}.
     37 * but they all share one {@link ProfilesRepository}.
    3838 */
    3939@ServerEndpoint("/websocket/liststream")
     
    7171                        }
    7272                };
    73                 Profiles.factory.addListener(changeListener);
     73                Profiles.repository.addListener(changeListener);
    7474        }
    7575
     
    9090        private Map<URI, List<URI>> getDomainsProfiles() {
    9191                Map<URI, List<URI>> allprofiles = new HashMap<>();
    92                 for (String domain : Profiles.factory.getDomains()) {
    93                         List<URI> profiles = Profiles.factory.getProfiles(domain).stream()
     92                for (String domain : Profiles.repository.getDomains()) {
     93                        List<URI> profiles = Profiles.repository.getProfiles(domain).stream()
    9494                                        .map(profile -> makeURI(domain, profile.getName()))
    9595                                        .collect(Collectors.toList());
     
    153153        @OnClose
    154154        public void end() throws IOException {
    155                 Profiles.factory.removeListener(changeListener);
     155                Profiles.repository.removeListener(changeListener);
    156156        }
    157157
Note: See TracChangeset for help on using the changeset viewer.