日期:2014-05-20  浏览次数:20560 次

题目讨论
If   class   A   needs   to   inform   class   B   about   an   important   event,   what   java   technique   can   you   use?     A   and   B   can   be   in   the   same   thread,   different   threads,   or   different   processes.   List   as   many   as   you   can.



------解决方案--------------------
无非就两种直接通知和间接通知
1.通过中间介质如XML,A修改,B实时监控制,介质可以变,自然所用到的技术就很多
2.直接通知,线程间的通讯,WAIT SLEEP NOTIFY 来控制
------解决方案--------------------
怎么看起来像Observer模式...
------解决方案--------------------
agree with LS, I think it is a typical Observer mode to apply.
------解决方案--------------------
关注,java进程之间通信好象没有固定的方法啊,希望赐教!
------解决方案--------------------
in the same thread, Observer pattern is a good choice

------解决方案--------------------
英语看不懂-_-!
------解决方案--------------------
看到是看得懂,但是不知道答案。.
学习一下....
------解决方案--------------------
一个字:Socket
------解决方案--------------------
??
英语不行啊。