Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
public interface HttpServer.WebSocketRegistry
What a
WebSocketRoutes callback puts its endpoints into.Methods
public abstract void route(String path, WebSocket endpoint) | Serves path with endpoint. |
public abstract void fallback(HttpServer.WebSocketHandler router) | Consulted for any upgrade route did not claim. |
Method details
route
public abstract void route(String path, WebSocket endpoint)Serves path with endpoint.
The path is matched against the request’s CANONICAL path – percent escapes decoded, query removed – exactly as an HTTP route is, so a key that could never be selected is refused here rather than accepted and left unreachable.
fallback
public abstract void fallback(HttpServer.WebSocketHandler router)Consulted for any upgrade
route did not claim.