https://nickhuber.ca/blog/python-opencv-camera-websockets has a reasonable pattern for how to do it
In java, ideally, set up one class to stream all camera data over a single, dedicated websocket port (independent of data stream)
Add javascript in UI to connect to that port and trigger frames to be sent for just the feeds needed, and paint the UI with any received frames.