path

fun path(path: String, publisher: Flow<String>, configure: ConfigBlock<ActiveConfig.Mapping> = ConfigBlock {})(source)

Bind an ant path to a data publisher.

For example, if path is provided as /fx/gbpusd then when a request for /fx/gbpusd is received publisher will be subscribed to in order to provide data.

Parameters

path

The ant path for which publisher will be subscribed to.

configure

A configuration block that can be used to set up the behaviour of this publisher.

publisher

This will be subscribed to and should be capable of supplying data in response.

See also


fun path(path: String, staticValue: String, configure: ConfigBlock<ActiveConfig.Mapping> = ConfigBlock {})(source)

Bind an ant path to a specific value.

For example, if path is provided as /fx/gbpusd then when a request for /fx/gbpusd is received staticValue will be returned in response.

Parameters

path

The ant path for which staticValue will be returned.

configure

A configuration block that can be used to set up the behaviour of this publisher.

staticValue

The data that will be returned in response.

See also