namespace

fun namespace(namespace: AntPatternNamespace, configure: ConfigBlock<ActiveConfig.Record> = ConfigBlock {}, supplier: PathVariablesSupplier<Publisher<out Map<String, String>>>)(source)

Bind a namespace to a supplier of data publishers.

For example, if a com.caplin.datasource.namespace.PrefixNamespace for /fx/ is bound then when a request for /fx/gbpusd is received the supplier will be called with /fx/gbpusd as the path parameter to return a Publisher which will be subscribed to in order to provide data.

Parameters

namespace

A namespace for matching subjects for which this supplier will be invoked.

configure

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

supplier

This will be invoked on each incoming request. It should parse the subject and provide a Publisher capable of supplying data in response.

See also

RegexNamespace
PrefixNamespace