I have a very general question concerning usage of services versus
Import/Export package. What would be the main principles in choosing between
one of these schemes?
Let's say I want to write a BASE64 encode/decode utility. Plain old java way
would be to write a class like
public class Base64Utility
{
public static String encode(byte[] data) {}
public static byte[] decode(String encodedData) {}
}
To use it I would Import the package it resides in and then write something
like
String s = Base64Utility.encode(mydata);
On the other hand I could register an OSGi service under an interface
similar to the class shown above. That would require some extra actions. But
is it right to create service for such a primitive class? How do I know when
to use a service and when to just Import/Export the class (sorry, package) I
need?
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev