GoldenGateBindings / com.fitbit.goldengate.bindings.coap.handler / BaseRxResourceHandler

BaseRxResourceHandler

abstract class BaseRxResourceHandler : BaseResourceHandler

Abstract class extended from BaseResourceHandler with extra functionality to receive data from a request and forward it to subscribed Observers

Constructors

<init>

BaseRxResourceHandler()

Abstract class extended from BaseResourceHandler with extra functionality to receive data from a request and forward it to subscribed Observers

Functions

emitUpdates

fun emitUpdates(data: ByteArray): Unit

Instructs the internal PublishSubject to emit data. This method is intended to be used inside handlers that extend the BaseRxResourceHandler when an onPost is override

observeUpdates

fun observeUpdates(): Observable<ByteArray>

Gets an Observable that will emit the data from the body of the incoming requests. The source of the data(POST, PUT request etc.) depends on the implementation of the class that extends BaseRxResourceHandler

Inherited Functions

onDelete

open fun onDelete(request: IncomingRequest, responseBuilder: OutgoingResponseBuilder): Single<OutgoingResponse>

Handler for request of DELETE

onGet

open fun onGet(request: IncomingRequest, responseBuilder: OutgoingResponseBuilder): Single<OutgoingResponse>

Handler for request of GET

onPost

open fun onPost(request: IncomingRequest, responseBuilder: OutgoingResponseBuilder): Single<OutgoingResponse>

Handler for request of POST

onPut

open fun onPut(request: IncomingRequest, responseBuilder: OutgoingResponseBuilder): Single<OutgoingResponse>

Handler for request of PUT