This is a conversational MQTT client written in Java that USES JavaSwing, SQLite, Paho, Beautyeye, and other technologies.The interface is simple and fresh, with the basic functions of MQTT and the session mode, which allows you to have a conversation under the same theme, and you can set the initial login information such as account number, password, ID and will.
\ No newline at end of file
This is a conversational MQTT client written in Java that USES JavaSwing, SQLite, Paho, Beautyeye, and other technologies.The interface is simple and fresh, with the basic functions of MQTT and the session mode, which allows you to have a conversation under the same theme, and you can set the initial login information such as account number, password, ID and will.
## the cause
Is to want to take part in the national undergraduate electronic design contest, teammate complain with bluetooth debugging to connect every time too much trouble, so want to use WIFI, so the thought of the MQTT protocol, due to the MQTT client haven't my satisfaction (contact with the two, MQTT. Cat fx, communication, MQTT. Fx quite good, but don't understand English, and single chip microcomputer because memory limit, generally define only one theme, conversational mode, theme is too much trouble), so start, take a few days to do this.
## MQTT related
MQTT is a package of paho, directly to the official website, and supports MQTT3.1.1. The key parts of MQTT (MqttClient class, MqttClientCallback class, etc.) are annotated in Chinese and can be compared between Chinese and English without modifying the official code.MQTT is small so it doesn't crop.This is more than 5M (87%), which is the size of SQLite (>_<).
## SQLite related
JDBC is 3.27.2.1 version of SQLite, website can't open is in [Bitbucket] (https://bitbucket.org/xerial/sqlite-jdbc/downloads/) to download.Made of JavaBeans (university-enterprise cooperation just learned this, I heard that there are more powerful), database related on top. All luckysmile.. The MQTT client. The data in the packet, driven by loading ways of the static load, initial learning Java annotations are detailed.
## is related to the Swing
Swing controls are named to meet the teacher's specifications, like the tag is JLB, the name is in English, meaningful.Using the JackJiang2011 [beautyeye] (https://github.com/JackJiang2011/beautyeye) skin bag, look good.Swing's structure should be fairly straightforward, with one Jpn for the main interface, one Jpn for session, login, subscribe, publish, and all the controls on the last four JPNS, and a single class for the session TAB, one for the main Jpn, one for receive and send and one for Jpn on the main Jpn.The comments are more detailed.
Project architecture is relevant
I just followed the teacher's train of thought when I started to learn Java. I don't understand any structure. Here is my structure.It is divided into four parts: view, monitor, service and data. Among them, service has service manager.View driven, and eventually back to the view, listening to the invoking service manager, which uniformly manages other services and data.The service manager, and the two view action classes should be singletons, but there isn't enough time to change them.All the code I wrote is in the Client.