Package org.basex.http.ws
Class WsFunction
java.lang.Object
org.basex.http.web.WebFunction
org.basex.http.ws.WsFunction
- All Implemented Interfaces:
Comparable<WebFunction>
This class represents a single WebSocket function.
- Author:
- BaseX Team 2005-21, BSD License, Johannes Finckh
-
Field Summary
FieldsFields inherited from class org.basex.http.web.WebFunction
function, headerParams, module, output -
Constructor Summary
ConstructorsConstructorDescriptionWsFunction(StaticFunc function, QueryContext qc, WebModule module) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(WebFunction func) Creates an exception with the specified message.booleanmatches(Annotation ann, WsPath pth) Checks if an WebSocket request matches this annotation and path.booleanChecks a function for REST and permission annotations.Methods inherited from class org.basex.http.web.WebFunction
bind, checkParsed, checkVariable, checkVariable, toString, toString
-
Field Details
-
path
Path of the function.
-
-
Constructor Details
-
WsFunction
Constructor.- Parameters:
function- associated user functionqc- query contextmodule- web module
-
-
Method Details
-
parse
Description copied from class:WebFunctionChecks a function for REST and permission annotations. This function is called both when a module is parsed, and when the function is prepared for evaluation.- Specified by:
parsein classWebFunction- Parameters:
ctx- database context- Returns:
trueif function contains relevant annotations- Throws:
QueryException- query exception
-
matches
Checks if an WebSocket request matches this annotation and path.- Parameters:
ann- annotation (can benull)pth- path to compare to (can benull)- Returns:
- boolean result of check
-
compareTo
-
error
Creates an exception with the specified message.- Specified by:
errorin classWebFunction- Parameters:
msg- messageext- error extension- Returns:
- exception
-