예제 #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();
 }