Пример #1
0
  @Override
  protected void doStart() throws Exception {
    // localhost endpoint should also start the component

    if ("localhost".equals(getHost())) {
      restartGpsDaemon();
    }
    gpsd4javaEndpoint = new GPSdEndpoint(host, port, new ResultParser());
    gpsd4javaEndpoint.start();

    LOG.info("GPSD Version: {}", gpsd4javaEndpoint.version());

    gpsd4javaEndpoint.watch(true, true);

    super.doStart();
  }
Пример #2
0
 @Override
 protected void doStop() throws Exception {
   if (gpsd4javaEndpoint != null) {
     gpsd4javaEndpoint.stop();
     gpsd4javaEndpoint = null;
   }
   super.doStop();
 }