ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | oscar List | December 2005 Index

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

RE: [oscar] UPnPEventListener and Filter


Yes, it seems that the Domoware driver misuses the oscar framework.

André

-----Message d'origine-----
De : Richard S. Hall [mailto:heavy@xxxxxxxxxxxxxx] 
Envoyé : vendredi 23 décembre 2005 16:10
À : oscar@xxxxxxxxxxxxx
Objet : Re: [oscar] UPnPEventListener and Filter

Just a guess, but it looks like the UPnP code does a "toString()" on your 
filter and then passes it into Oscar's FilterImpl to reparse it, which gives 
you the parsing error, because that code it in the FilterImpl constructor.

-> richard

BOTTARO Andre RD-MAPS-GRE wrote:
>  
> I would like to listen to UPnP events coming from a Service with a 
> given ID. I wrote the following Java code with respect to OSGi R3 spec 
> but I got this exception at runtime with Domoware UPnP Base Driver 
> 3.0.1 above Oscar 1.0.5:
>
> org.osgi.framework.InvalidSyntaxException: expected filtercomp
>         at org.ungoverned.oscar.FilterImpl.<init>(FilterImpl.java:88)
>         at
> org.ungoverned.oscar.Oscar.getServiceReferences(Oscar.java:2792)
>         at
> org.ungoverned.oscar.BundleContextImpl.getServiceReferences(BundleCont
> ex
> tImpl.java:246)
>         at
> it.cnr.isti.niche.osgi.upnp.basedriver.importer.core.MyCtrlPoint.servi
> ce
> Changed(MyCtrlPoint.java:450)
>         at
> org.ungoverned.oscar.util.ServiceListenerWrapper.serviceChanged(Servic
> eL
> istenerWrapper.java:129)
>         at org.ungoverned.oscar.Oscar$7.dispatch(Oscar.java:3584)
>         at
> org.ungoverned.oscar.util.OscarDispatchQueue.dispatch(OscarDispatchQue
> ue
> .java:92)
>         at org.ungoverned.oscar.Oscar.fireServiceEvent(Oscar.java:3590)
>         at org.ungoverned.oscar.Oscar.registerService(Oscar.java:2755)
>         at
> org.ungoverned.oscar.BundleContextImpl.registerService(BundleContextIm
> pl
> .java:143)
>         at
> org.ungoverned.oscar.BundleContextImpl.registerService(BundleContextIm
> pl
> .java:137)
>         at
> com.francetelecom.upnp.controlpoint.UPnPEventTest.test(UPnPEventTest.j
> av
> a:1259)
>
>
> Source code:
>               UPnPEventListener listener = new UPnPEventListener(){
>                       public void notifyUPnPEvent(String arg0, String arg1, 
> Dictionary 
> arg2) {
>                       }
>               };
>               Properties p = new Properties();
>               p.put(UPnPEventListener.UPNP_FILTER, new Filter(){
>                       public boolean match(ServiceReference ref) {
>                               System.out.println("?????? Matching Service 
> Reference:" + ref);
>                               return false;
>                       }
>                       public boolean match(Dictionary dict) {
>                               boolean matchesService =
> dict.get(UPnPService.ID).equals(s.getService().getId());
>                               if(matchesService){
>                                       return true;
>                               }
>                               return false;
>                       }}
>               );
>       
> context.getBundleContext().registerService(UPnPEventListener.class.get
> Na me(), listener, p); // UPnPEventTest.java:1259
>
>       
>
>   
> ----------------------------------------------------------------------
> --
>
>
> --
> You receive this message as a subscriber of the oscar@xxxxxxxxxxxxx mailing 
> list.
> To unsubscribe: mailto:oscar-unsubscribe@xxxxxxxxxxxxx
> For general help: mailto:sympa@xxxxxxxxxxxxx?subject=help
> ObjectWeb mailing lists service home page: 
> http://www.objectweb.org/wws
>   




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

Reply via email to:

Powered by MHonArc.

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