摘要:
Displaying additional log informationIf your JXTA application isn't behaving as you expect, you can turn on additional logging so that more information is displayed when your application runs.The JavaDoc for the net.jxta.logging.Logging class provides complete instructions and examples for enabl 阅读全文
摘要:
从该方法名称上来说,应该是不能获得本地通告,本着探究的精神,首先做个小测试,再从源代码中寻找答案。----------------------------------------------------------------------------- 测试结果:本地通告确实取不到,从源代码看不出来(水平不够啊,对JXSE底层架构不清楚)。这样的话有些情况就不好处理,例如:利用通告实现在线感知功能,如果系统中只剩下两个用户A和B,如果用户B发生某些异常(例如网路中断),这时候A通过getRemoteAdvertisements试图发现B的通告,此时B因为网络中断,不会响应这个请求,而根据上面的 阅读全文
摘要:
publicvoidrun(){ byte[]buffer=newbyte[16384]; DatagramPacketpacket=newDatagramPacket(buffer,buffer.length); try{for(;;){//pool正在关闭(shutdown)时不在接收数据if(!pool.isShutdown()&&!pool.isTerminated()){mcastSocket.receive(packet);pool.execute(newHandler(packet));}else{LOG.info("JxtaMulticastSocke 阅读全文