class CoapEndpoint : NativeReference, StackService, Endpoint, DataSinkDataSource
Coap Client/Server API.
Use CoapEndpointProvider for creating an instance
class AddResourceHandlerResult
Result for CoapEndpoint.addResourceHandler native call |
|
class ResponseForResult
Result for CoapEndpoint.responseFor and CoapEndpoint.responseForBlockwise native call |
CoapEndpoint()
Coap Client/Server API. |
val requestFilter: CoapGroupRequestFilter |
|
val thisPointer: Long
Pointer to native jni reference for this object |
fun addResourceHandler(path: String, handler: ResourceHandler, configuration: CoapEndpointHandlerConfiguration): Completable
Registers a coap handler for a certain path. |
|
fun attach(dataSinkDataSource: DataSinkDataSource): Unit
Attach the source and sink |
|
fun close(): Unit |
|
fun detach(): Unit |
|
fun getAsDataSinkPointer(): Long |
|
fun getAsDataSourcePointer(): Long |
|
fun removeResourceHandler(path: String): Completable
Unregisters the coap handler for a certain path |
|
fun responseFor(request: OutgoingRequest): Single<IncomingResponse>
Call this to send a request and get a response (i.e. be a client). |
|
fun setFilterGroup(group: CoapGroupRequestFilterMode, key: NodeKey<String>): Unit
Update the current filter group used by the CoAP request filter. |
open fun <T> resource(path: String, parser: ByteArrayParser<T>): Single<T>
Convenience method for making a GET request to path and parsing it into a T |
|
open fun <T> responseFor(request: OutgoingRequest, parser: ByteArrayParser<T>): Single<T>
Convenience method for parsing a Response into a T |