Package edu.tufts.hrilab.gui
Class GuiManager
java.lang.Object
edu.tufts.hrilab.gui.GuiManager
- All Implemented Interfaces:
org.springframework.web.socket.config.annotation.WebSocketConfigurer
@SpringBootApplication
@EnableWebSocket
@ComponentScan(basePackages="edu.tufts.hrilab")
public class GuiManager
extends Object
implements org.springframework.web.socket.config.annotation.WebSocketConfigurer
An implementation of the Spring server backend. Spins up a
Handler to handle the WebSocket connection and its messages,
and also provides some RESTful endpoints. For the frontend to function, this
program must be run in one of two ways:
- Putting
SpringApplication.run(GuiManager.class, args);in themain()method of your DIARC configuration file. Doing this will launch theGuiManageralongside your DIARC components. - Running this class's
main()method using./gradlew launch -Pmain=edu.tufts.hrilab.gui.GuiManagerin the terminal. Note that this will cause a new TRADE container to be spawned, which requires that you configure your TRADE properties in a way that allows for mutual discovery of containers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidvoidregisterWebSocketHandlers(org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry registry) Add endpoints and allow the client to access them.
-
Constructor Details
-
GuiManager
public GuiManager()Constructor.
-
-
Method Details
-
registerWebSocketHandlers
public void registerWebSocketHandlers(org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry registry) Add endpoints and allow the client to access them.- Specified by:
registerWebSocketHandlersin interfaceorg.springframework.web.socket.config.annotation.WebSocketConfigurer- Parameters:
registry- registry object that configures request mappings
-
main
-