Package org.osgi.framework

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


            ServiceRegistration reg = context.registerService(URLStreamHandlerService.class, this, props);

            new URL("test" + System.identityHashCode(TestURLHandlersActivator.this) + ":").openConnection();

            reg.unregister();

            try
            {
                new URL("test" + System.identityHashCode(TestURLHandlersActivator.this) + ":").openConnection();
                throw new Exception("Unexpected url resolve");
View Full Code Here


                public void run()
                {
                    try
                    {
                        ServiceRegistration sr = m_registrations.remove( clazz );
                        sr.unregister();
                        m_disabledLatch.countDown();
                    }
                    catch ( Throwable e )
                    {
                        m_logService.log( LogService.LOG_ERROR, "error while enabling " + clazz, e );
View Full Code Here

                {
                    executor.execute(new Runnable()
                    {
                        public void run()
                        {
                            sr.unregister();
                            managedServiceUnregistered.countDown();
                        }
                    });
                }
View Full Code Here

    {
        ServiceRegistration sr = getRegistration();
        if ( sr != null )
        {
            setRegistration( null );
            sr.unregister();
        }
    }


    public String getValue2()
View Full Code Here

    {
        ServiceRegistration sr = getRegistration();
        if ( sr != null )
        {
            setRegistration( null );
            sr.unregister();
        }
        return this;
    }

View Full Code Here

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

    }
View Full Code Here

       
        Iterator<ServiceRegistration> iterator = regs.iterator();
        while (iterator.hasNext())
        {
            ServiceRegistration reg = iterator.next();
            reg.unregister();
            iterator.remove();
        }
    }

    public void run()
View Full Code Here

                {
                    // ignore
                }
            }

            listener.unregister();
        }
    }


    @Test
View Full Code Here

                    // ignore
                }
            }

            listener.unregister();
            listenerAsync.unregister();
        }
    }
}
View Full Code Here

            this.getJobManager().addJob(TOPIC, null);
            assertTrue("No event received in the given time.", cb.block(5));
            cb.reset();
            assertFalse("Unexpected event received in the given time.", cb.block(5));
        } finally {
            reg.unregister();
        }
    }

    /**
     * Test simple job execution.
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.