コード例 #1
0
  @Override
  public void unregister(DLProcessor dlProcessor) {
    ServiceRegistration<DLProcessor> serviceRegistration =
        _serviceRegistrations.remove(dlProcessor.getType());

    serviceRegistration.unregister();
  }
コード例 #2
0
  private void _deleteStorage(WebDAVStorage storage) {
    ServiceRegistration<WebDAVStorage> serviceRegistration = _serviceRegistrations.remove(storage);

    if (serviceRegistration != null) {
      serviceRegistration.unregister();
    }
  }
コード例 #3
0
  public void unregister(String languageId) {
    ServiceRegistration<ResourceBundle> serviceRegistration =
        _serviceRegistrations.remove(languageId);

    if (serviceRegistration != null) {
      serviceRegistration.unregister();
    }
  }
コード例 #4
0
  public void destroy() {
    for (ServiceRegistration<Object> serviceRegistration : _serviceRegistrations.values()) {

      serviceRegistration.unregister();
    }

    _serviceTracker.close();
  }
コード例 #5
0
  private void _unregister(Class<?> clazz, String name) {
    XStreamAlias xStreamAlias = new XStreamAlias(clazz, name);

    ServiceRegistration<XStreamAlias> serviceRegistration =
        _serviceRegistrations.remove(xStreamAlias);

    if (serviceRegistration != null) {
      serviceRegistration.unregister();
    }
  }
コード例 #6
0
  public void clear() {
    Set<Entry<String, ServiceRegistration<ResourceBundle>>> set = _serviceRegistrations.entrySet();

    Iterator<Entry<String, ServiceRegistration<ResourceBundle>>> iterator = set.iterator();

    while (iterator.hasNext()) {
      Entry<String, ServiceRegistration<ResourceBundle>> entry = iterator.next();

      ServiceRegistration<ResourceBundle> serviceRegistration = entry.getValue();

      serviceRegistration.unregister();

      iterator.remove();
    }
  }
コード例 #7
0
  @Override
  public void register(DLProcessor dlProcessor) {
    Registry registry = RegistryUtil.getRegistry();

    ServiceRegistration<DLProcessor> previousServiceRegistration =
        _serviceRegistrations.remove(dlProcessor.getType());

    if (previousServiceRegistration != null) {
      previousServiceRegistration.unregister();
    }

    ServiceRegistration<DLProcessor> serviceRegistration =
        registry.registerService(DLProcessor.class, dlProcessor);

    _serviceRegistrations.put(dlProcessor.getType(), serviceRegistration);
  }