RouteMapBuilder

The receiver of an EdgesBuilder.route block, which maps each route the source node may emit to a target node, written on("billing") then billing or "billing" then billing. Mapping one route to several nodes fans out on that route.

Functions

Link copied to clipboard
fun anyOf(first: Route, second: Route, vararg rest: Route): RouteSet

Groups routes for on, so one entry fires on any of them.

fun anyOf(first: Int, second: Int, vararg rest: Int): RouteSet

Groups number routes for on, so one entry fires on any of them.

fun anyOf(first: String, second: String, vararg rest: String): RouteSet

Groups string routes for on, so one entry fires on any of them.

Link copied to clipboard
fun on(route: Route): RouteMapEntry

Starts an entry for route; RouteMapEntry.then completes it.

fun on(routes: RouteSet): RouteMapEntry

Starts an entry whose edge fires once when the source node emits any of routes (built with anyOf); RouteMapEntry.then completes it.

fun on(route: Boolean): RouteMapEntry

Starts an entry for route as a Route.Flag; RouteMapEntry.then completes it.

fun on(route: Int): RouteMapEntry

Starts an entry for route as a Route.Num; RouteMapEntry.then completes it.

fun on(route: String): RouteMapEntry

Starts an entry for route as a Route.Tag; RouteMapEntry.then completes it.

Link copied to clipboard
fun otherwise(node: Node)

Leads to node when no other route of the source node matches, including when it emits none.

fun otherwise(first: Node, second: Node, vararg rest: Node)

Leads to first, second, and each of rest when no other route of the source node matches, including when it emits none.

Link copied to clipboard
infix fun Route.then(node: Node)

Leads to node when the source node emits this route; short for on(this).then(node).

infix fun RouteSet.then(node: Node)

Leads to node when the source node emits any of these routes; short for on(this).then(node).

infix fun Boolean.then(node: Node)

Leads to node when the source node emits this value as a Route.Flag; short for on(this).then(node).

infix fun Int.then(node: Node)

Leads to node when the source node emits this number as a Route.Num; short for on(this).then(node).

infix fun String.then(node: Node)

Leads to node when the source node emits this string as a Route.Tag; short for on(this).then(node).

fun Route.then(first: Node, second: Node, vararg rest: Node)

Leads to first, second, and each of rest when the source node emits this route.

fun RouteSet.then(first: Node, second: Node, vararg rest: Node)

Leads to first, second, and each of rest when the source node emits any of these routes.

fun Boolean.then(first: Node, second: Node, vararg rest: Node)

Leads to first, second, and each of rest when the source node emits this value as a Route.Flag.

fun Int.then(first: Node, second: Node, vararg rest: Node)

Leads to first, second, and each of rest when the source node emits this number as a Route.Num.

fun String.then(first: Node, second: Node, vararg rest: Node)

Leads to first, second, and each of rest when the source node emits this string as a Route.Tag.