Package io.jmix.flowui.devserver
Class ViteWebsocketProxy
java.lang.Object
io.jmix.flowui.devserver.ViteWebsocketProxy
- All Implemented Interfaces:
- jakarta.websocket.MessageHandler,- jakarta.websocket.MessageHandler.Whole<String>
public class ViteWebsocketProxy
extends Object
implements jakarta.websocket.MessageHandler.Whole<String>
Connects a browser-server websocket connection with a server-Vite websocket
 connection.
 
Forwards all messages from one to the other.
- 
Nested Class Summary
- 
Constructor SummaryConstructorsConstructorDescriptionViteWebsocketProxy(jakarta.websocket.Session browserSession, Integer vitePort) Creates a new proxy for the given browser-server websocket connection.
- 
Method Summary
- 
Constructor Details- 
ViteWebsocketProxypublic ViteWebsocketProxy(jakarta.websocket.Session browserSession, Integer vitePort) throws InterruptedException, ExecutionException Creates a new proxy for the given browser-server websocket connection.Opens a connection to the Vite server running on the given port and starts forwarding messages. - Parameters:
- browserSession- the websocket connection from the browser
- vitePort- the port the Vite server is running on
- Throws:
- ExecutionException- if there is a problem with the connection
- InterruptedException- if there is a problem with the connection
 
 
- 
- 
Method Details- 
getLoggerprotected org.slf4j.Logger getLogger()
- 
onMessage- Specified by:
- onMessagein interface- jakarta.websocket.MessageHandler.Whole<String>
 
- 
closepublic void close()Terminates the connection.
 
-