コード例 #1
0
  @Override
  public boolean equals(Object obj) {
    if (!(obj instanceof BundleContextWrapper)) return false;

    BundleContextWrapper other = (BundleContextWrapper) obj;
    return delegate.equals(other.delegate);
  }
コード例 #2
0
ファイル: JolokiaActivator.java プロジェクト: nickman/jolokia
  /** {@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;
  }