felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Moloney <tim.molo...@gmail.com>
Subject Re: Whiteboard filter question
Date Wed, 16 May 2012 21:13:11 GMT
After thinking about it for a while, I figured out that the "name=*"
wouldn't work in the service property.  I don't know why I though that
would work.  It only works in the filter, as you pointed out.

I finally got it working using:
GET_ONE: "name=foo"
GET_ALL: <nothing>
services: (|(!(name=*))(name=<name>))
which means to send the status to anything whose name service property
either doesn't exist or is the service name.

I think that I like your "(all=yes)" idea better and I'll probably switch
to that.

Thanks for your help.

Tim


On Wed, May 16, 2012 at 4:58 PM, Donald Whytock <dwhytock@gmail.com> wrote:

> Sorry...a little more of an inline response:
>
> > Scenario 1
> > - All services are registered according to their function
> > - GET_ALL also registered as a StatusListener with *no* service
> properties
> > - GET_ONE also registered as a StatusListener with "name=foo" service
> > property
> > - When sending status, all the services use *no* filter in the query
> > Results
> > - GET_ALL gets all the status (good)
> > - GET_ONE gets all the status (bad)
>
> Using no filter will detect all services, since there's nothing
> limiting them.  This will get you both GET_ALL and GET_ONE.
>
> > Scenario 2
> > - All services are registered according to their function
> > - GET_ALL also registered as a StatusListener with *no* service
> properties
> > - GET_ONE also registered as a StatusListener with "name=foo" service
> > property
> > - When sending status, all the services use *"name=<name>"* filter in the
> > query
> > Results
> > - GET_ALL gets no status (bad)
> > - GET_ONE gets its desired status (good)
>
> Using "name=<name>" will match GET_ONE if the name is "foo".  It won't
> match GET_ALL because GET_ALL doesn't have a name property set.
>
> > Scenario 3
> > - All services are registered according to their function
> > - GET_ALL also registered as a StatusListener with *"name=*"* service
> > properties
> > - GET_ONE also registered as a StatusListener with "name=foo" service
> > property
> > - When sending status, all the services use *"name=<name>"* filter in the
> > query
> > Results
> > - GET_ALL gets no status (bad)
> > - GET_ONE gets its desired status (good)
>
> Wildcards only work in the filter, not in what the filter filters on.
> So using "name=*" for GET_ALL will at best set the name property to
> "*".  Which can in fact be searched for using escape characters or
> percent literals, but it seems more straightforward to use some value
> such as "all", or alternately use a different property such as
> "all=yes", and then filter for (!(name=<name>)(all=yes)).
>
> Don
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message