软件导刊
軟件導刊
연건도간
SOFT WARE GUIDE
2014年
10期
115-118
,共4页
异步通信%框架设计%套接字%多线程%设计模式
異步通信%框架設計%套接字%多線程%設計模式
이보통신%광가설계%투접자%다선정%설계모식
Android%Framework Design%Socket%Multithreading%Design Patterns
利用Java多线程以及线程间通信技术实现TCP/IP异步通信存在耦合度较高、模块可重用性低等弱点,采用中介者设计模式进行改进并设计TCP/IP客户端异步通信框架。在家畜养殖智能监控系统的通信模块中对该通信框架进行了验证。结果表明,采用该框架设计的通信模块响应及时、性能稳定。
利用Java多線程以及線程間通信技術實現TCP/IP異步通信存在耦閤度較高、模塊可重用性低等弱點,採用中介者設計模式進行改進併設計TCP/IP客戶耑異步通信框架。在傢畜養殖智能鑑控繫統的通信模塊中對該通信框架進行瞭驗證。結果錶明,採用該框架設計的通信模塊響應及時、性能穩定。
이용Java다선정이급선정간통신기술실현TCP/IP이보통신존재우합도교고、모괴가중용성저등약점,채용중개자설계모식진행개진병설계TCP/IP객호단이보통신광가。재가축양식지능감공계통적통신모괴중대해통신광가진행료험증。결과표명,채용해광가설계적통신모괴향응급시、성능은정。
In order to improve the user experience and robustness of the procedure ,after Android 2 .3 ,the networking code should not be executes on a child threa ,the developers need to combine multithread technique to realize network communi-cation .This paper studied the way to implement TCP/IP asynchronous communication way with the Java multi-threading and communications between threads ,meanwhile to improve and design the client framework for asynchronous communi-cation inorder to overcome the problems like module coupling is higher and the reusability is low .This framework has been implemented in the development of communication module of the livestock intelligent monitoring system w hich is verified that the communication module works timely and stability .