congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ServiceRegistration.unregister
Code IndexAdd Tabnine to your IDE (free)

How to use
unregister
method
in
org.osgi.framework.ServiceRegistration

Best Java code snippets using org.osgi.framework.ServiceRegistration.unregister (Showing top 20 results out of 6,768)

origin: wildfly/wildfly

  @Override
  public void stop(BundleContext context) throws Exception {
    registrationS.unregister();
    registrationP.unregister();
  }
}
origin: vert-x3/vertx-examples

 @Override
 public void stop(BundleContext context) throws Exception {
  if (vertxRegistration != null) {
   vertxRegistration.unregister();
   vertxRegistration = null;
  }
  if (ebRegistration != null) {
   ebRegistration.unregister();
   ebRegistration = null;
  }
 }
}
origin: hibernate/hibernate-orm

  @Override
  public void stop(BundleContext context) throws Exception {
    osgiServiceUtil.stop();
    osgiServiceUtil = null;
    
    persistenceProviderService.unregister();
    persistenceProviderService = null;
    sessionFactoryService.unregister();
    sessionFactoryService = null;
  }
}
origin: vert-x3/vertx-examples

 @Invalidate
 public void unregisterJDBCClientService() {
  registration.unregister();
  client.close();
 }
}
origin: org.postgresql/postgresql

 public void stop(BundleContext context) throws Exception {
  if (_registration != null) {
   _registration.unregister();
   _registration = null;
  }

  if (Driver.isRegistered()) {
   Driver.deregister();
  }
 }
}
origin: apache/tika

@Override
public void stop(BundleContext context) throws Exception {
  parserService.unregister();
  detectorService.unregister();
}
origin: org.eclipse.core/runtime

private void stopServices() {
  if (legacyPreferencesService != null) {
    legacyPreferencesService.unregister();
    legacyPreferencesService = null;
  }
  if (customPreferencesService != null) {
    customPreferencesService.unregister();
    customPreferencesService = null;
  }
}
origin: org.kie/kie-api

  @Override
  public void stop( BundleContext context ) throws Exception {
    this.discoveryReg.unregister();
  }
}
origin: org.eclipse.core/runtime

public void unregisterBundleGroupProvider(IBundleGroupProvider provider) {
  // get the service reference (map provider -> reference)
  ServiceRegistration<IBundleGroupProvider> registration;
  synchronized (groupProviders) {
    registration = groupProviders.remove(provider);
  }
  if (registration == null)
    return;
  // unregister the provider
  registration.unregister();
}
origin: org.apache.cxf/cxf-rt-transports-http

@Override
public void removedService(ServiceReference<HttpService> reference, HttpService service) {
  servletPublisherReg.unregister();
  try {
    servletExporter.updated(null);
  } catch (ConfigurationException e) {
    // Ignore
  }
}
origin: rhuss/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;
  }
  //Shut this down last to make sure nobody calls for a property after this is shutdown
  if (configAdminTracker != null) {
    configAdminTracker.close();
    configAdminTracker = null;
  }
  if (jolokiaHttpContext instanceof ServiceAuthenticationHttpContext) {
    final ServiceAuthenticationHttpContext context =
        (ServiceAuthenticationHttpContext) jolokiaHttpContext;
    context.close();
  }
  restrictor = null;
  bundleContext = null;
}
origin: jitsi/jitsi-videobridge

serviceRegistration.unregister();
if (videobridge != null)
  videobridge.stop(bundleContext);
origin: jitsi/jitsi-videobridge

/**
 * Stops this {@code Activator}.
 *
 * @param bundleContext the {@code BundleContext} in which this
 * {@code Activator} is stopping
 * @throws Exception error stopping and removing dependent services.
 */
@Override
public void stop(BundleContext bundleContext)
  throws Exception
{
  bundleContext.removeServiceListener(this);
  if (serviceRegistration != null)
  {
    serviceRegistration.unregister();
    serviceRegistration = null;
  }
  if (conferenceStatsHandler != null)
  {
    conferenceStatsHandler.stop();
    conferenceStatsHandler = null;
  }
}
origin: jitsi/jitsi-videobridge

serviceRegistration.unregister();
if (statsMgr != null)
  statsMgr.stop(bundleContext);
origin: org.apache.cxf/cxf-rt-transports-http

serviceRegistration.unregister();
origin: apache/cxf

public void postShutdown() {
  if (service != null) {
    service.unregister();
    service = null;
  }
}
origin: jclouds/legacy-jclouds

/**
* Unregisters itself from the service registry.
*/
public void stop() {
 registration.unregister();
}
origin: biz.aQute.bnd/biz.aQute.bndlib

  public void close() {
    if (closed.getAndSet(true) == false) {
      registerService.unregister();
      lrRegistration.unregister();
    }
  }
}
origin: org.apache.felix/org.apache.felix.scr

public boolean dereference()
{
  if ( referenceCount.decrementAndGet() == 0 )
  {
    this.m_registration.unregister();
    this.m_registration = null;
    return true;
  }
  return false;
}
origin: apache/cxf

@Override
public void removedService(ServiceReference<HttpService> reference, HttpService service) {
  servletPublisherReg.unregister();
  try {
    servletExporter.updated(null);
  } catch (ConfigurationException e) {
    // Ignore
  }
}
org.osgi.frameworkServiceRegistrationunregister

Javadoc

Unregisters a service. Remove a ServiceRegistration object from the Framework service registry. All ServiceReference objects associated with this ServiceRegistration object can no longer be used to interact with the service once unregistration is complete.

The following steps are required to unregister a service:

  1. The service is removed from the Framework service registry so that it can no longer be obtained.
  2. A service event of type ServiceEvent#UNREGISTERING is fired so that bundles using this service can release their use of the service. Once delivery of the service event is complete, the ServiceReference objects for the service may no longer be used to get a service object for the service.
  3. For each bundle whose use count for this service is greater than zero:
    • The bundle's use count for this service is set to zero.
    • If the service was registered with a ServiceFactory object, the ServiceFactory.ungetService method is called to release the service object for the bundle.

Popular methods of ServiceRegistration

  • getReference
    Returns a ServiceReference object for a service being registered. The ServiceReference object may be
  • setProperties
    Updates the properties associated with a service. The Constants#OBJECTCLASS and Constants#SERVICE_ID

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (ScheduledExecutorService)
  • onCreateOptionsMenu (Activity)
  • getResourceAsStream (ClassLoader)
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now