Annotation Interface HandleWeb
MessageType.WEBREQUEST).
Web requests received by the Fluxzero Runtime are logged. Connected client applications can route these requests using
this annotation or one of its specific variants, like HandleGet, HandlePost, etc.
This annotation can be used directly to handle any method (GET, POST, etc.), or indirectly via more specific
annotations like HandleGet, HandlePost, HandleSocketOpen, etc.
By default, a handler will return a result which is published to the WebResponse log. To suppress this
behavior, set passive = true.
- See Also:
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanIftrue,HEADrequests may be routed to matchingGEThandlers when no explicitHEADhandler is present.booleanIftrue, matching routes may contribute to automatically generatedOPTIONSresponses when no explicitOPTIONShandler is present.booleanIftrue, disables this handler during discovery.String[]HTTP or WebSocket methods that this handler supports (e.g.booleanIftrue, the handler will not publish a response to theWebResponselog.booleanIftrue, indexed web request messages whose effective timeout has already expired may be skipped before this handler is invoked.String[]One or more path patterns this handler applies to (e.g.
-
Element Details
-
value
String[] valueOne or more path patterns this handler applies to (e.g./users,/accounts/{id},/accounts/*/users). If empty, the path is based on thePathannotation.Patterns support literal path parts,
{name}parameters,{name:regex}constrained parameters, and*wildcards. A non-final*matches within a single path segment, while a final*matches the rest of the path. Optional path fragments can be declared with square brackets, for example/users[/{id}]. Trailing slashes on non-root paths are ignored.- Default:
{}
-
disabled
boolean disabledIftrue, disables this handler during discovery.- Default:
false
-
method
String[] methodHTTP or WebSocket methods that this handler supports (e.g. GET, POST, WS_OPEN). Default isHttpRequestMethod.ANY.- Default:
{"*"}
-
passive
boolean passiveIftrue, the handler will not publish a response to theWebResponselog.- Default:
false
-
skipExpiredRequests
boolean skipExpiredRequestsIftrue, indexed web request messages whose effective timeout has already expired may be skipped before this handler is invoked.Defaults to
truefor HTTP handlers because stale responses are usually no longer useful. WebSocket lifecycle annotations opt out because those messages represent connection events rather than ordinary requests.- Default:
true
-
autoHead
boolean autoHeadIftrue,HEADrequests may be routed to matchingGEThandlers when no explicitHEADhandler is present. Only applies toGETmappings.- Default:
true
-
autoOptions
boolean autoOptionsIftrue, matching routes may contribute to automatically generatedOPTIONSresponses when no explicitOPTIONShandler is present.- Default:
true
-