Annotation 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 Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    If true, disables this handler during discovery.
    HTTP or WebSocket methods that this handler supports (e.g.
    boolean
    If true, the handler will not publish a response to the WebResponse log.
    One or more path patterns this handler applies to (e.g.
  • Element Details

    • value

      String[] value
      One or more path patterns this handler applies to (e.g. /users, /accounts/*). If empty, the path is based on the Path annotation.
      Default:
      {}
    • disabled

      boolean disabled
      If true, disables this handler during discovery.
      Default:
      false
    • method

      String[] method
      HTTP or WebSocket methods that this handler supports (e.g. GET, POST, WS_OPEN). Default is HttpRequestMethod.ANY.
      Default:
      {"*"}
    • passive

      boolean passive
      If true, the handler will not publish a response to the WebResponse log.
      Default:
      false