MCPcopy Create free account
hub / github.com/BaseXdb/basex / get

Method get

basex-api/src/main/java/org/basex/http/ws/WebSocket.java:68–77  ·  view source on GitHub ↗

Creates a new WebSocket instance. @param request request @return WebSocket or null

(final HttpServletRequest request)

Source from the content-addressed store, hash-verified

66 * @return WebSocket or {@code null}
67 */
68 static WebSocket get(final HttpServletRequest request) {
69 final WebSocket ws = new WebSocket(request);
70 try {
71 if(!WebModules.get(ws.context).findWs(ws, null).isEmpty()) return ws;
72 } catch(final Exception ex) {
73 Util.debug(ex);
74 throw new CloseException(StatusCode.ABNORMAL, ex.getMessage());
75 }
76 return null;
77 }
78
79 @Override
80 public void onWebSocketConnect(final Session sess) {

Callers 1

createWebSocketMethod · 0.95

Calls 5

getMethod · 0.95
debugMethod · 0.95
findWsMethod · 0.80
isEmptyMethod · 0.45
getMessageMethod · 0.45

Tested by

no test coverage detected