public class RouteNode<T extends ComponentsProvider>
A node in the tree of routes that make up an API.
The routes in an API can be represented as a tree. The route at the base of the API / is represented by
the RouteNode at the root of the tree. Each node in the tree corresponds to one section of a route.
For example, consider an API with the following routes:
/foo
/foo/bar
/foo/baz
/qux
It is represented by the following tree:
/
|- foo
| |- bar
| `- baz
`- qux
| Modifier and Type | Class and Description |
|---|---|
static class |
RouteNode.Companion |
| Modifier and Type | Field and Description |
|---|---|
static RouteNode.Companion |
Companion |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,ws.osiris.core.RouteNode> |
getFixedChildren()
The fixed node children of this node,
|
java.util.Map<ws.osiris.core.HttpMethod,kotlin.Pair> |
getHandlers()
Handlers
|
java.lang.String |
getName()
The name of the node;
|
VariableRouteNode<T> |
getVariableChild()
The variable node that is a child of this node;
|
public static RouteNode.Companion Companion
public java.lang.String getName()
The name of the node;
For a fixed node this is the path part, for a variable node it's the variable name.
public java.util.Map<ws.osiris.core.HttpMethod,kotlin.Pair> getHandlers()
Handlers
(and their associated interface Auth) keyed by the HTTP method they handle
interface Authpublic java.util.Map<java.lang.String,ws.osiris.core.RouteNode> getFixedChildren()
The fixed node children of this node,
keyed by their path part.
public VariableRouteNode<T> getVariableChild()
The variable node that is a child of this node;
has a variable path part, e.g. {foo}.