GoldenGateBindings / com.fitbit.goldengate.bindings.coap / Endpoint / addResourceHandler

addResourceHandler

abstract fun addResourceHandler(path: String, handler: ResourceHandler, configuration: CoapEndpointHandlerConfiguration = CoapEndpointHandlerConfiguration()): Completable

Registers a coap handler for a certain path.

An error will be emitted if trying to register handler on previously registered path

Parameters

path - The path where the coap handler will be registered.

handler - The handler that will get called when a coap request is received.

configuration - contains all the flags used by coap handler registration

Return
Completable - Error: If the coap endpoint registration fails. - Complete: The coap handler is registered.