コード例 #1
0
  @Validate
  public void start() {
    log.debug("Start OSGiServiceSimple: " + toString());

    if (servicesConfig.findServiceById(id) == null) {
      // Clear destinations
      destinations.clear();

      servicesConfig.addService(this);
      started = true;
    } else {
      log.error("Service \"" + id + "\" already registered");
    }
  }
コード例 #2
0
 @Invalidate
 public void stop() {
   log.debug("Stop OSGiServiceSimple: " + toString());
   if (servicesConfig != null) {
     servicesConfig.removeService(id);
     started = false;
   }
 }