ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google

Mail Archive Home | oscar List | July 2004 Index

<--  Date Index  --> <--  Thread Index  -->

Re: class of state variable?

Matrim Cauthon wrote:
its me again.
I'm currently having the problem about this in the specification:
Concerning the notifyUPnPEvent method and there the event parameter
 Each entry has a String key representing the event name (= state variable name) and the new value of the state variable. The class of the value object must match the class specified by the UPnP State Variable associated with the event.
Does this mean that if the State Variable is representing an Integer I have to add an Integer object holding this value?
Yes, you should note that when someone register as UPnPEvenListener it must receive a Dictionary with the actual value of all State Variable
The thing is that I somehow get for each StateVariable a change event. Then I can the variable query for its value and get it as a String.
So is it now up to me to manage this String in a class of the datatype of the StateVariable?
Yes, we had the same trouble too and we built a class Converter with static methods String toString(Object val,String type) and String parseString(String val, String type) that encode and decode as OSGi said.
Because I' kinda stuck right now and I don't want to dig deeper without knowing this will be the right thing to do.
(I know how I can retrieve the class of the StateVariable but I don't know how to create such a value object (with this class) having that value specified by the String ):
Any Ideas?
Thanks a lot !

<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.