Class WorldManager

  • @Component("world")
    public class WorldManager
    extends Object
    Main component that manages all interactions with virtual worlds.
    • Constructor Detail

      • WorldManager

        public WorldManager()
    • Method Detail

      • init

        public void init()
      • listClasses

        public List<Class<?>> listClasses()
      • getOrCreateWorld

        public World getOrCreateWorld​(String name)
      • getClientByName

        public Client getClientByName​(String name)
      • getClientByName

        public <T extends Client> T getClientByName​(String name,
                                                    Class<T> cls)
      • save

        public <T extends VRObject> T save​(T obj)
      • add

        public List<VRObject> add​(Client client,
                                  List<VRObject> objects)
        Add objects to client's current position
        client - client adding objects
        objects - objects to add
        list of added objects
      • login

        public Welcome login​(org.springframework.web.socket.handler.ConcurrentWebSocketSessionDecorator session)
        Remote user login over websocket. Called SessionManager, after websocket session has been established. Uses session security context (principal) to identify user and fetch/create the appropriate Client object from the ClientFactory. May create a new guest client, if guest (anonymous) connections are allowed.
        session - websocket session
        Welcome message
      • login

        public void login​(Client client)
        Stage 2 of login, executed once client has been identified. Does not depend on websocket session, can be used for internal login, e.g. bots.
        client -
      • defaultWorld

        public World defaultWorld()
      • logout

        public void logout​(Client client)