On 2016-09-13T16:39:28 +0000 [email protected] wrote: > > Clearly, at the very least, I would publish one protocol handler > service per supported protocol major version. That way, when a client > connects, the server can get a list of all protocol handling services > in order to determine what versions are currently supported. I believe > I need to use service properties to do this, but I'm struggling > to find a way to do it that's actually pleasant.
It strikes me that a better way to handle this would be to publish
exactly one service per unique (major, minor) pair. All of the services
that claim to implement a given major version m would actually just
delegate to a protocol handler that implements (m, n), where n is the
highest minor version in existence.
Then, the service property would be separated so that instead of
specifying "message_protocol=1.0", the properties would instead specify
"message_protocol_major=1" and "message_protocol_minor=0". Doing this
would allow for using >=, <=, etc, in the filter strings that search
for services. I'm not sure if there's a way to sort and limit via
filters though... Something akin to an SQL query:
SELECT * from services
WHERE message_protocol_major = 1
ORDER BY message_protocol_minor
LIMIT 1;
"Give me all services that implement major version 1, return them in
order of minor version, highest first, and only give me the first one".
M
pgptf3MwWlupK.pgp
Description: OpenPGP digital signature
_______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
