开发者

How to write "Intercepting Filter Pattern" like Java's servlet filter in Flex?

开发者 https://www.devze.com 2023-02-10 04:40 出处:网络
I want to know how to write \"Intercepting Filter Pattern\" like Java\'s servlet filter in Flex. And I want to insert it into the classes which have a role of server communicating.

I want to know how to write "Intercepting Filter Pattern" like Java's servlet filter in Flex.

And I want to insert it into the classes which have a role of server communicating.

Please show me any s开发者_StackOverflowample codes if any...


Create a class which will play a role of connector between your program and server. Put there event listener for server events. Create a constant types for different types of events that server could send to your program. Put a switch into event listener that receive these events, and re dispatch them to the specific places, depending on which type of the event it was.

0

精彩评论

暂无评论...
验证码 换一张
取 消