ModuleMessageInterceptor 与 MessageInterceptor
我正在使用 cairngorm 模块库和 Parsley 在 Flex 中开发一个应用程序。
Parsley 文档第 5 章说:“当您想要决定是否应将消息传递给处理程序时,拦截器可能会派上用场”。
当使用 ModuleMessageInterceptor 时,上述情况不成立。这意味着我的 MessageHandler 在 MessageInterceptor 之前接收到消息。
有谁知道解决办法吗?
问候,
法迪
I am developing an application in Flex using the cairngorm module library and Parsley.
Parsley documentation chapter 5 says: "Interceptors may come in handy when you want to decide whether or not the message should be passed to handlers".
When using the ModuleMessageInterceptor the above is not true. Which means that my MessageHandler receive the message before the MessageInterceptor.
Does anyone knows a work around?
Regards,
Fadi
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这个问题的解决方案是扩展 ModuleMessageInterceptor 类,如下所示:
通过执行上述操作,我们已将 order 属性添加到 ModuleMessageInterceptor 中,这解决了我遇到的问题。
问候,
法迪·曼苏尔
The solution to this problem was extending the ModuleMessageInterceptor class as follows:
By doing the above we have added the order property to the ModuleMessageInterceptor which solve the problem I had.
Regards,
Fadi Mansour
在 Parsley 2.4 中,MessageInterceptors 已被废弃:
ModuleMessageInterceptor 不是 Parsley 的东西,而是 Cairngorm 的东西。就我个人而言,由于我的经验,我会完全远离凯恩戈姆。上网查了一下,其他人也有类似的问题。您最好的选择是在同一个论坛上发帖并希望有人提供帮助。
In Parsley 2.4, MessageInterceptors have been depracated:
And ModuleMessageInterceptor is not a Parsley thing, it's a Cairngorm thing. Personally, I'd stay away of Cairngorm altogether because of my experience with it. After looking online, I saw that other people had similar issues. Your best bet is to post on the same forum and hopes somebody helps.