题目讨论
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
[解决办法]
??
英语不行啊。