Class WebPattern
java.lang.Object
io.fluxzero.sdk.web.WebPattern
Represents a pattern used to match incoming
WebRequests to handler methods.
A WebPattern is created for each handler method meta-annotated with @HandleWeb and encapsulates a URI
pattern and HTTP method used to route requests.
The URI is parsed and dissected into components using a regular expression. This enables precise matching against request paths, origins, and other elements of the URI structure.
URI Parsing
The underlying URI parsing follows the general URI syntax as defined in RFC 3986. Specifically:path– The relative or absolute path (e.g.,/users/{id})origin– The full origin (e.g.,https://example.com) including scheme and authority
Route Pattern Syntax
Paths 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.
Instances of WebPattern are typically generated by the framework and not manually constructed.
However, understanding this structure is useful when inspecting or customizing request dispatch behavior.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionWebPattern(String uri, String method) WebPattern(String uri, String method, boolean autoHead, boolean autoOptions) -
Method Summary
-
Constructor Details
-
WebPattern
-
WebPattern
-