package grandland.glits.vehicle.gps;
import grandland.glits.vehicle.gps.service.VehicleLocationService;
import grandland.glits.vehicle.gps.socket.SocketServer;
import grandland.glits.vehicle.gps.util.ConfigureUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* JTT809Server
*/
public class JTT809Server {
public static final Logger LOG = LoggerFactory.getLogger(JTT809Server.class);
private static final int PORT = ConfigureUtil.getProperties(ConfigureUtil.PropertiesKey.SERVER_PORT 8386);
private static final int SERVICE_THREAD_NUM = ConfigureUtil.getProperties(ConfigureUtil.PropertiesKey.SERVICE_THTEAD_NUM 1);
private VehicleLocationService[] services;
public static void main(String[] args) throws Exception {
SocketServer.getInstance(PORT).startServer();
LOG.info(“JTT809Server start listen port: {}“ PORT);
final JTT809Server jtt809Server = new JTT809Server();
Runtime.getRuntime().addShutdownHook(new Thread() {
public void run() {
jtt809Server.stop();
}
});
jtt809Server.start();
}
public void start() throws ClassNotFoundException {
services = new VehicleLocationService[SERVICE_THREAD_NUM];
for (int i = 0; i services[i] = new VehicleLocationService();
services[i].setName(String.valueOf(i));
services[i].start();
}
}
public void stop() {
for (int i = 0; i if (services[i] != null) {
services[i].stop();
}
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-12-22 21:39 gl-vehicle-gps\
目录 0 2019-12-22 21:38 gl-vehicle-gps\build\
文件 441 2019-12-22 19:35 gl-vehicle-gps\build.gradle
目录 0 2019-12-22 21:38 gl-vehicle-gps\build\classes\
目录 0 2019-12-22 21:38 gl-vehicle-gps\build\classes\main\
目录 0 2019-12-22 21:38 gl-vehicle-gps\build\classes\main\grandland\
目录 0 2019-12-22 21:38 gl-vehicle-gps\build\classes\main\grandland\glits\
目录 0 2019-12-22 21:38 gl-vehicle-gps\build\classes\main\grandland\glits\vehicle\
目录 0 2019-12-22 21:38 gl-vehicle-gps\build\classes\main\grandland\glits\vehicle\gps\
目录 0 2019-12-22 21:38 gl-vehicle-gps\build\classes\main\grandland\glits\vehicle\gps\client\
文件 4920 2019-12-22 20:50 gl-vehicle-gps\build\classes\main\grandland\glits\vehicle\gps\client\ComData4Ztc.class
文件 950 2019-12-22 20:50 gl-vehicle-gps\build\classes\main\grandland\glits\vehicle\gps\client\ILocationService.class
文件 3325 2019-12-22 20:50 gl-vehicle-gps\build\classes\main\grandland\glits\vehicle\gps\client\Location.class
文件 2496 2019-12-22 20:50 gl-vehicle-gps\build\classes\main\grandland\glits\vehicle\gps\client\ob
文件 282 2019-12-22 20:50 gl-vehicle-gps\build\classes\main\grandland\glits\vehicle\gps\client\package-info.class
文件 954 2019-12-22 20:50 gl-vehicle-gps\build\classes\main\grandland\glits\vehicle\gps\client\WriteLocationInfo.class
文件 897 2019-12-22 20:50 gl-vehicle-gps\build\classes\main\grandland\glits\vehicle\gps\client\WriteLocationInfoResponse.class
目录 0 2019-12-22 21:38 gl-vehicle-gps\build\classes\main\grandland\glits\vehicle\gps\domain\
文件 1850 2019-12-22 20:50 gl-vehicle-gps\build\classes\main\grandland\glits\vehicle\gps\domain\TXZInfo.class
文件 3175 2019-12-22 20:50 gl-vehicle-gps\build\classes\main\grandland\glits\vehicle\gps\domain\Vehicle.class
文件 2955 2019-12-22 20:50 gl-vehicle-gps\build\classes\main\grandland\glits\vehicle\gps\domain\YYZInfo.class
目录 0 2019-12-22 21:38 gl-vehicle-gps\build\classes\main\grandland\glits\vehicle\gps\entity\
文件 3761 2019-12-22 20:50 gl-vehicle-gps\build\classes\main\grandland\glits\vehicle\gps\entity\VehicleLocation.class
文件 689 2019-12-22 20:50 gl-vehicle-gps\build\classes\main\grandland\glits\vehicle\gps\JTT809Server$1.class
文件 2600 2019-12-22 20:50 gl-vehicle-gps\build\classes\main\grandland\glits\vehicle\gps\JTT809Server.class
目录 0 2019-12-22 21:38 gl-vehicle-gps\build\classes\main\grandland\glits\vehicle\gps\manager\
文件 192 2019-12-22 20:50 gl-vehicle-gps\build\classes\main\grandland\glits\vehicle\gps\manager\IManager.class
文件 2498 2019-12-22 20:50 gl-vehicle-gps\build\classes\main\grandland\glits\vehicle\gps\manager\ManagerRegistry.class
文件 695 2019-12-22 20:50 gl-vehicle-gps\build\classes\main\grandland\glits\vehicle\gps\manager\TXZManager$1.class
文件 4556 2019-12-22 20:50 gl-vehicle-gps\build\classes\main\grandland\glits\vehicle\gps\manager\TXZManager.class
文件 754 2019-12-22 20:50 gl-vehicle-gps\build\classes\main\grandland\glits\vehicle\gps\manager\VehicleManager$1.class
............此处省略154个文件信息