Package org.osgi.framework

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


        }
        final Iterator i = regs.iterator();
        while (i.hasNext())
        {
            final ServiceRegistration reg = (ServiceRegistration) i.next();
            reg.unregister();
        }
        this.rbManager.dispose();
    }

    private void add(final ServiceReference reference, final Object service)
View Full Code Here


        {
            reg = (ServiceRegistration) this.registrations.remove(reference);
        }
        if (reg != null)
        {
            reg.unregister();
        }
    }

    /**
     * @see org.osgi.util.tracker.ServiceTrackerCustomizer#addingService(org.osgi.framework.ServiceReference)
View Full Code Here

            Thread.sleep(100);
        }
        assertTrue(found);

        // Unregister the service, this should get rid of the URL handler in JNDI
        reg.unregister();

        boolean gone = false;
        int j=0;
        while (j < 20) {
            try {
View Full Code Here

            }
        } finally {
            ServiceRegistration oldRegistration = (newRegistration == null) ? registrations.remove(pid) : registrations.put(pid, newRegistration);
            if (oldRegistration != null) {
                LOGGER.debug("CELLAR CLOUD: un-registering blob store discovery service {}", pid);
                oldRegistration.unregister();
            }
        }
    }

    @Override
View Full Code Here

    @Override
    public void deleted(String pid) {
        LOGGER.debug("CELLAR CLOUD: blob store discovery service deleted {}", pid);
        ServiceRegistration oldRegistration = registrations.remove(pid);
        if (oldRegistration != null) {
            oldRegistration.unregister();
        }
    }

}
View Full Code Here

            // un-register cluster group consumers
            if (consumerRegistrations != null && !consumerRegistrations.isEmpty()) {
                ServiceRegistration consumerRegistration = consumerRegistrations.get(groupName);
                if (consumerRegistration != null) {
                    consumerRegistration.unregister();
                    consumerRegistrations.remove(groupName);
                }
            }

            // un-register cluster group producers
View Full Code Here

            // un-register cluster group producers
            if (producerRegistrations != null && !producerRegistrations.isEmpty()) {
                ServiceRegistration producerRegistration = producerRegistrations.get(groupName);
                if (producerRegistration != null) {
                    producerRegistration.unregister();
                    producerRegistrations.remove(groupName);
                }
            }

            // remove consumers & producers
View Full Code Here

            // unregister configuration printer too
            ServiceRegistration reg = printerRegistration;
            if (reg != null)
            {
                reg.unregister();
                printerRegistration = null;
            }
        }

    }
View Full Code Here

    public void destroy() {
        service.shutdown();
        for (Map.Entry<EndpointDescription, ServiceRegistration> entry : registrations.entrySet()) {
            ServiceRegistration registration = entry.getValue();
            registration.unregister();
        }
        for (Map.Entry<String, EventConsumer> consumerEntry : consumers.entrySet()) {
            EventConsumer consumer = consumerEntry.getValue();
            consumer.stop();
        }
View Full Code Here

     *
     * @param endpoint the endpoint description.
     */
    private void unImportService(EndpointDescription endpoint) {
        ServiceRegistration registration = registrations.get(endpoint);
        registration.unregister();

        producers.remove(endpoint.getId());
        EventConsumer consumer = consumers.remove(endpoint.getId());
        if (consumer != null) {
            consumer.stop();
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.