Package io.fluxcapacitor.javaclient.web
Annotation Interface HandleWeb
@Documented
@Retention(RUNTIME)
@Target({METHOD,ANNOTATION_TYPE})
@HandleMessage(WEBREQUEST)
public @interface HandleWeb
Marks a method or meta-annotation as a handler for incoming web requests (
MessageType.WEBREQUEST
).
Web requests received by the Flux platform 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 ElementDescriptionboolean
Iftrue
, disables this handler during discovery.String[]
HTTP or WebSocket methods that this handler supports (e.g.boolean
Iftrue
, the handler will not publish a response to theWebResponse
log.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/*
). If empty, the path is based on thePath
annotation.- 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 theWebResponse
log.- Default:
false
-