CoapResource class abstract

Interface for a resource

Constructors

CoapResource()

Properties

attributes → CoapResourceAttributes?
Gets the attributes of this resource.
no setter
cachable bool?
Indicates if is the URI of the resource can be cached. If another request with the same destination URI arrives, it can be forwarded to this resource right away instead of traveling through the resource tree looking for it.
no setter
children Iterable<CoapResource>?
Gets all child resources.
no setter
endpoints Iterable<Endpoint>?
Gets the endpoints this resource is bound to.
no setter
hashCode int
The hash code for this object.
no setterinherited
name String?
The name of the resource. Note that changing the name of a resource changes the path and URI of all children. Note that the parent of this resource must be notified that the name has changed so that it finds the resource under the correct new URI when another request arrives.
getter/setter pair
observable bool?
Indicates if this resource is observable by remote CoAP clients.
no setter
parent CoapResource?
The parent of this resource.
getter/setter pair
path String?
the path to the resource which is equal to the URI of its parent plus a slash. Note that changing the path of a resource also changes the path of all its children.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uri String?
The uri of the resource.
no setter
visible bool?
Indicates if the resource is visible to remote CoAP clients.
no setter

Methods

add(CoapResource child) → void
Adds the specified resource as child.
addObserveRelation(CoapObserveRelation relation) → void
Adds the specified CoAP observe relation.
getChild(String name) CoapResource
Gets the child with the specified name.
handleRequest(CoapExchange? exchange) → void
Handles the request from the specified exchange.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(CoapResource child) bool
Removes the the specified child. Returns true if the child was found, otherwise false
removeObserveRelation(CoapObserveRelation relation) → void
Removes the specified CoAP observe relation.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited