Not in the OSGi Spec!
←Older revision | Revision as of 16:46, 17 February 2015 | ||
Line 17: | Line 17: | ||
According to an email that I got from [[Richard Hall]] recently, I could have read the [[OSGi]] specification as many times as I wanted and I would still find nothing. The ''reference:'' protocol is a non-spec extension honored both by [[Felix]] and [[Equinox]]! | According to an email that I got from [[Richard Hall]] recently, I could have read the [[OSGi]] specification as many times as I wanted and I would still find nothing. The ''reference:'' protocol is a non-spec extension honored both by [[Felix]] and [[Equinox]]! | ||
- | This is a nice example of [[Teleinterface]]. On one side there is the user of [[Felix]] or [[Equinox]], on the other side there is the | + | This is a nice example of [[Teleinterface]]. On one side there is the user of [[Felix]] or [[Equinox]], on the other side there is the application using [[OSGi]] container via in the middle [[OSGi]] [[API]]s. The [[API]] itself knows nothing about ''reference:'' protocol, yet it allows such information to ''tunnel through''. The ''String'' parameter in this case serves as an opaque container. Its content is ignored by the [[API]] itself, and interpreted just by the actual implementation. |
I still consider this to be an anti-pattern (especially due to problems with proper documentation of all the extensions), but it is useful to keep in mind that strings can be used to implement [[Teleinterface]]s. | I still consider this to be an anti-pattern (especially due to problems with proper documentation of all the extensions), but it is useful to keep in mind that strings can be used to implement [[Teleinterface]]s. | ||
[[Category:APIDesignPatterns:Anti]] | [[Category:APIDesignPatterns:Anti]] |