@Override
  public boolean equals(Object obj) {
    if (!(obj instanceof BundleContextWrapper)) return false;

    BundleContextWrapper other = (BundleContextWrapper) obj;
    return delegate.equals(other.delegate);
  }
Beispiel #2
0
  /** {@inheritDoc} */
  public void stop(BundleContext pBundleContext) {
    assert pBundleContext.equals(bundleContext);

    if (httpServiceTracker != null) {
      // Closing the tracker will also call {@link HttpServiceCustomizer#removedService()}
      // for every active service which in turn unregisters the servlet
      httpServiceTracker.close();
      httpServiceTracker = null;
    }

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

    restrictor = null;
    bundleContext = null;
  }