Hi there,

I need to look into OIC Specification on the Collection observe one more time,
however, there was a description on how to handle requet(ex: observe) on the 
collection resource
(or maybe agreed implicitly)

As you may know, collection has children resources and resource client could 
get those
information (which is ?links? property of the collection resource) by sending 
GET request
to the collection resource.
And this ?links? information could be updated when resource server ?ADD? or 
?REMOVE?
child (or children) resource(s) from the collection resource.

Here are the cases when you have to send a observe response back to those 
observers
of the collection resource.

     1. Update of the children of the collection resource ( links property 
value )
         - ex : Add/Remove child (or children) resource(s) to/from the 
collection resource
     2. Update of (a) property value(s) of the child(or children) resource(s)
         - ex : temperature = 10.0 ?> temperature = 11.0

But be aware of the default interface type of the collection resource which is 
?oic.if.ll?.
That means if the resource client do not insert any information into a QUERY 
(ex: GET /collection )
then the resource client will only get response with information about the ?1? 
above.

Therefore if the resource client wants to get response with information about 
the ?2? above
it should send request with ?if=oic.if.b? in the query (ex : GET /collection ? 
if=oic.if.b)

Let me share you the link where you could fine the RAML file for the oic.wk.col 
resorce type.
?> 
https://github.com/openconnectivityfoundation/core/blob/master/oic.wk.col.raml 
<https://github.com/openconnectivityfoundation/core/blob/master/oic.wk.col.raml>


There?re 2 ways of handling request on the Collection Resource you registered.
    1. Use the ?Default Collection Resource Entity Handler? insider the 
iotivity stack.
    2. Implement your own Entity Handler for your collection resource(s).

You choose ?1? above by not inserting NULL for the entity handler param when 
you register 
the collection resource, then the iotivity will take care of the request.
FYI, there was a discussion on ?Removing the Default Collection Entity Handler? 
inside the iotivity
therefore, you will have to keep monitoring on the iotivity mailing list. 

I hope my tips would help you a bit. :)
Feel free to ask any questions if you have more.

Thank you.
Jay.


> 2017. 3. 3. ?? 11:03, Matta Jayaram <mattajayaram at gmail.com> ??:
> 
> 
> Dear Team,
> 
>       Now I am working on resource collection ,created 6 resources and I am 
> able to perform GET,PUT,POST on it individually & all at a time.
> 
>       Now I am trying to Implement observe method,But OIC specification does 
> not say anything about collection resources should not support observer 
> functionality.Its very common that server can have collection type resources 
> and client can observe its status.
> 
>      Should I need to take care of Application entityHandler for handling the 
> observe requests on collection resource ?
> 
> Please suggest me
> 
> 
> 
> -- 
> 
> With Regard's'
> Matta Jayaram
> +91-9493952323
> +91-8096796118
> _______________________________________________
> iotivity-dev mailing list
> iotivity-dev at lists.iotivity.org
> https://lists.iotivity.org/mailman/listinfo/iotivity-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20170304/b50c829b/attachment.html>

Reply via email to