Hamilton Verissimo de Oliveira wrote:
> >
> > Can you give some use cases or scenarios where you need
> your version
> > of a discovery strategy?
>
> Hey, I'm not saying that we should use the ServiceTemplate
> strategy as it is. But I'm saying that only a hint may not be
> enough :-)
>
Yes, I understand that :) (I just tried to be a little bit picky
about it...)
> Do you want use cases, uh? Hmmm..
>
> Server side instant messaging application. As new versions of
> client application are release there are a few differences
> implemented in the protocol (and new features). After the
> registration, the server may ask through lookup
>
> LookupCriteria criteria = new LookupCriteria(
> ClientProtocolHandler.class );
> criteria.add("protocol-version", "4.2.1.0");
> criteria.add("firewalled", Boolean.FALSE );
>
> WDYT?
>
Ah, ok, I see. Ok, of course you could build one big key out
of this - but that would be very ugly. Agreed.
Now, what do you think of:
lookup(Class service , Object key);
In my case the key is a String, in your case it's a lookup
criteria object.
For the client this is a simple call - not necessarily the
need to create a criteria object etc. if strings are sufficient.
And if you need complexer things it's still possible.
Carsten
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Apache Excalibur Project -- URL: http://excalibur.apache.org/