欢迎来到源码之家!

当前位置:

> 源码分享>

一个基于交通部809协议的Java实现的车辆GPS数据接收服务端程序代码

  • 软件大小: 21.71MB
  • 文件类型: .zip
  • 软件类别: Java
  • 软件语言: 简体中文
  • 更新时间: 2024-05-14
内容介绍
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\objectFactory.class
     文件         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个文件信息
下载地址
下载错误? 【投诉报错】

一个基于交通部809协议的Java实现的车辆GPS数据接收服务端程序代码

下载声明

☉ 解压密码: www.zzjlb.com。[ 如果不正确 ]请联系站长。
☉ 推荐使用 [ 迅雷] 下载,使用 [ WinRAR v5] 以上版本解压本站软件。
☉ 如果遇到不能下载的情况,请联系站长解决。
☉ 下载本站资源,如果服务器暂不能下载请过一段时间重试。
☉ 如果遇到什么问题,请加本站QQ群提出,我将尽可能解决。
☉ 本站分享的一些商业软件是供学习研究之用,如用于商业用途,请购买正版。
☉ 本站分享的资源来源互联网,版权归原作者所有。