Package org.osgi.framework

Examples of org.osgi.framework.ServiceRegistration.unregister()


    mxserver.unregisterMBean(objName);

    if (registerAsService) {
      ServiceRegistration registration = (ServiceRegistration) registeredServices.remove(objName);
      if (registration != null) {
        registration.unregister();
      }
    }
  }

  public Object getAttribute(String objectName, String attribute) throws Exception {
View Full Code Here


            item.serviceID.toString());

        ServiceRegistration reg = (ServiceRegistration) services.remove(service);

        if (reg != null) {
            reg.unregister();
        } else {
            Debug.printDebugInfo(10,
                "Service Already Unregistered out OSGi Framework");
        }
View Full Code Here

    }

    public void removedBundle(Bundle bundle, BundleEvent event, Object object) {
        if (object instanceof ServiceRegistration) {
            ServiceRegistration service = (ServiceRegistration) object;
            service.unregister();
        }
    }

    private InfoProvider createInfo(String entry) {
        if (entry == null) {
View Full Code Here


    public void deleted(String pid) {
        ServiceRegistration oldRegistration = registrations.remove(pid);
        if (oldRegistration != null) {
            oldRegistration.unregister();
        }
    }

    /**
     * Checks if configuration is valid for the specified {@link ProviderMetadata}.
View Full Code Here

        } finally {
            ServiceRegistration oldRegistration = (newRegistration == null)
                    ? registrations.remove(pid)
                    : registrations.put(pid, newRegistration);
            if (oldRegistration != null) {
                oldRegistration.unregister();
            }
        }
    }

    /**
 
View Full Code Here

    private void unregisterRecipeProviderForService(BundleContext context, String serviceId, ChefService chefService) {
        if (registrationMap.containsKey(serviceId)) {
            ServiceRegistration registration = registrationMap.remove(serviceId);
            try {
                registration.unregister();
            } catch (Exception ex) {
                //ignore
            }
        }
    }
View Full Code Here

                this.sleep(1000);
            }
            assertEquals(0, this.getJobManager().getScheduledJobs().size()); // job is not scheduled anymore
            info.unschedule();
        } finally {
            ehReg.unregister();
        }
    }

}
View Full Code Here

            }
        }, null);
        while ( views.isEmpty() ) {
            this.sleep(10);
        }
        reg.unregister();
        final TopologyView view = views.get(0);

        try {
            final ServiceReference[] refs = this.bc.getServiceReferences(TopologyEventListener.class.getName(),
                    "(objectClass=org.apache.sling.event.impl.jobs.config.JobManagerConfiguration)");
View Full Code Here

                assertEquals("Checking topic " + topic, created.get(topic).get(), added.get(topic).get());
            }
*/

        } finally {
            eventHandler.unregister();
            for(final ServiceRegistration reg : registrations) {
                reg.unregister();
            }
        }

View Full Code Here

        }

        if (proxyRegistration != null) {
            log.debug("Unregistering {}", proxyRegistration);
            this.bundleContext.ungetService(serviceReference);
            proxyRegistration.unregister();
        }
    }

    // Helpers
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.