ipojo 自定义处理程序 - 自动附加处理程序 - 附加到特定组件时出现问题
我有一个关于 ipojo 中的自定义自动处理程序的问题。我创建了一个处理程序(例如 Handler-Auto),我希望该处理程序自动附加到 POJO 组件实例(例如 Comp-1),而不触及 POJO 组件的元数据。 为此,我们需要使用以下链接中指定的处理程序列表在系统属性中设置“org.apache.felix.ipojo.handler.auto.primitive”变量:
问题是,当我这样做时,我的处理程序(Handler-Auto)会附加到在系统上创建或部署的所有组件或实例。要拦截来自特定组件的方法或字段,我们需要在处理程序中添加过滤器。但在附加处理程序和所有不必要的东西后添加过滤器已经太晚了。
不是将处理程序附加到所有组件,无论如何,我可以将此处理程序(Handler-Auto)附加到特定组件或实例吗?根据用户的意愿。
如果我们有这个功能那就太好了,它会变得非常动态。
如果有其他方法可以做到这一点,请帮忙或者有什么解决方案可以实现这一目标?
提前感谢您的帮助!
谢谢, 萨迪什
I have an issues concerning the custom auto handlers in ipojo. I have created an handler (say Handler-Auto), I want this handler to be auto attached to a POJO component instances (say Comp-1) without touching the metadata of POJO components.
To achieve this, we need to set the "org.apache.felix.ipojo.handler.auto.primitive" variable in the system property with the list of handlers as specified in the below link:
The problem is, when I do like this, my handler (Handler-Auto) is attached to all the components or instances that are created or deployed over the system. To intercept methods or fields from a particular component we need to add filter at the handler. But its too late to add filter after attaching handlers with all unnecessary stuffs.
Instead of attaching the handler to all the components, Is there anyway that, this handler (Handler-Auto) can me made to be attached to a specific components or instances ? as per the user wish.
It would be great if we have this feature and it ll become very dynamic.
Please help if there is any other way to do this or what could be the solution to achieve this ??
thanks for your help in advance!
Thanks,
Sadish
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论