将 AOP 与 OSGI 结合使用的最佳解决方案? [英] Best solution for using AOP with OSGI?

查看:25
本文介绍了将 AOP 与 OSGI 结合使用的最佳解决方案?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Equinox,所以 Equinox Aspect 项目似乎很简单,但该项目似乎处于非活动状态,并且只有一页文档让我在最后犹豫不决.

I am using Equinox, so the Equinox Aspect project seems like a no-brainer, but that project appears to be inactive and has only one page of documentation that leaves me hanging at the end.

除了那个项目,我没有看到很多在 OSGI 中使用 AOP 的选项.让我知道你们的想法和可能性,谢谢:)

Other than that project, I do not see many options for using AOP in OSGI. Let me know what you all think and what the possibilities are, thanks :)

推荐答案

作为替代方案,您还可以考虑使用 Apache Felix Dependency Manager,它允许您在运行时向现有 OSGi 服务添加拦截器.当然,这绝不是完全的 AOP 替代品,但对于某些用例来说,这可能就足够了.

As an alternative, you could also consider using the Apache Felix Dependency Manager, which allows you to at runtime add interceptors to existing OSGi services. Of course this is in no way a full AOP replacement, but for some use cases it might be enough.

您可以在此处找到更多文档和示例:

You can find more documentation and an example here:

http://felix.apache.org/site/apache-felix-dependency-manager-osgi-design-patterns.html

这篇关于将 AOP 与 OSGI 结合使用的最佳解决方案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆