Salvatore,

Short answer: no.  An early version of IoTivity provided minimal introspection, 
but it was removed.  The story is that you should know what server you are 
talking to and what it's resources look like and contain.

Long answer: the information can be obtained via the C API and careful coding.  
The Java API is built on the C++ API, which doesn't have the information 
available.

I argued we need introspection, to no avail.

John Light
Intel OTC OIC development


-----Original Message-----
From: iotivity-dev-bounces at lists.iotivity.org 
[mailto:[email protected]] On Behalf Of Salvatore Iovene
Sent: Tuesday, February 09, 2016 12:16 AM
To: iotivity-dev <iotivity-dev at lists.iotivity.org>
Subject: [dev] Java API: how can I get a list of the keys in OcRepresentation?

Hi,
when I use OcPlatform.getDeviceInfo, I get a callback "onDeviceFound"
with an OcRepresentation as argument.

Is there a way to iterate all the keys in the OcRepresentation?

If not, I'm blind as to what's in there, because I don't know what keys to use 
with the "getValue" method.

Thanks!
Salvatore


--
Salvatore Iovene

Personal website: http://iovene.com/
Founder of AstroBin: http://astrobin.com/ 
_______________________________________________
iotivity-dev mailing list
iotivity-dev at lists.iotivity.org
https://lists.iotivity.org/mailman/listinfo/iotivity-dev

Reply via email to