Examples of BlueprintListener


Examples of org.osgi.service.blueprint.container.BlueprintListener

    }

    public void postRegister(Boolean registrationDone) {
        // reg listener
        if (registrationDone && registrations.incrementAndGet() == 1) {
            BlueprintListener listener = new BlueprintStateListener();
            eventDispatcher = Executors.newSingleThreadExecutor(new JMXThreadFactory("JMX OSGi Blueprint State Event Dispatcher"));
            listenerReg = context.registerService(BlueprintListener.class.getName(), listener, null);
        }
    }
View Full Code Here

Examples of org.osgi.service.blueprint.container.BlueprintListener

        }
        this.eventAdminListener = listener;

        this.containerListenerTracker = new ServiceTracker(bundleContext, BlueprintListener.class.getName(), new ServiceTrackerCustomizer() {
            public Object addingService(ServiceReference reference) {
                BlueprintListener listener = (BlueprintListener) bundleContext.getService(reference);

                synchronized (listeners) {
                    sendInitialEvents(listener);
                    listeners.add(listener);
                }
View Full Code Here

Examples of org.osgi.service.blueprint.container.BlueprintListener

    public WaitForBlueprintGBean(@ParamSpecial(type = SpecialAttributeType.bundleContext) BundleContext bundleContext,
                                 @ParamAttribute(name = "packageName") String packageName,
                                 @ParamAttribute(name = "symbolicName") String symbolicName) throws Exception {
        final Bundle bundle = BundleUtils.unwrapBundle(getBundle(bundleContext, symbolicName, packageName));
        BlueprintListener listener = new BlueprintListener() {

            @Override
            public void blueprintEvent(BlueprintEvent event) {
                if (event.getBundle() == bundle) {
                    if (event.getType() == BlueprintEvent.CREATED || event.getType() == BlueprintEvent.FAILURE) {
View Full Code Here

Examples of org.osgi.service.blueprint.container.BlueprintListener

        this.bundleContext = bundleContext;
        this.abstractName = abstractName;
    }

    public void doStart() throws Exception {    
        BlueprintListener listener = new BlueprintListener() {
            @Override
            public void blueprintEvent(BlueprintEvent event) {
                if (event.getType() == BlueprintEvent.CREATED) {
                    startConnectorGBeans(event.getBundle());
                } else if (event.getType() == BlueprintEvent.DESTROYED) {
View Full Code Here

Examples of org.osgi.service.blueprint.container.BlueprintListener

        }
        this.eventAdminListener = listener;

        this.containerListenerTracker = new ServiceTracker(bundleContext, BlueprintListener.class.getName(), new ServiceTrackerCustomizer() {
            public Object addingService(ServiceReference reference) {
                BlueprintListener listener = (BlueprintListener) bundleContext.getService(reference);

                synchronized (listeners) {
                    sendInitialEvents(listener);
                    listeners.add(listener);
                }
View Full Code Here

Examples of org.osgi.service.blueprint.container.BlueprintListener

        }
        this.eventAdminListener = listener;

        this.containerListenerTracker = new ServiceTracker(bundleContext, BlueprintListener.class.getName(), new ServiceTrackerCustomizer() {
            public Object addingService(ServiceReference reference) {
                BlueprintListener listener = (BlueprintListener) bundleContext.getService(reference);

                synchronized (listeners) {
                    sendInitialEvents(listener);
                    listeners.add(listener);
                }
View Full Code Here

Examples of org.osgi.service.blueprint.container.BlueprintListener

        }
        this.eventAdminListener = listener;

        this.containerListenerTracker = new ServiceTracker(bundleContext, BlueprintListener.class.getName(), new ServiceTrackerCustomizer() {
            public Object addingService(ServiceReference reference) {
                BlueprintListener listener = (BlueprintListener) bundleContext.getService(reference);

                synchronized (listeners) {
                    sendInitialEvents(listener);
                    listeners.add(listener);
                }
View Full Code Here

Examples of org.osgi.service.blueprint.container.BlueprintListener

    private volatile BlueprintEvent event;
    private CountDownLatch latch = new CountDownLatch(1);

    public WaitForBlueprintGBean(@ParamSpecial(type= SpecialAttributeType.bundleContext)BundleContext bundleContext) throws Exception {
        final Bundle bundle = bundleContext.getBundle();
        BlueprintListener listener = new BlueprintListener() {

            @Override
            public void blueprintEvent(BlueprintEvent event) {
                if (event.getBundle() == bundle) {
                    if (event.getType() == BlueprintEvent.CREATED || event.getType() == BlueprintEvent.FAILURE) {
View Full Code Here

Examples of org.osgi.service.blueprint.container.BlueprintListener

        }
        this.eventAdminListener = listener;

        this.containerListenerTracker = new ServiceTracker(bundleContext, BlueprintListener.class.getName(), new ServiceTrackerCustomizer() {
            public Object addingService(ServiceReference reference) {
                BlueprintListener listener = (BlueprintListener) bundleContext.getService(reference);

                synchronized (listeners) {
                    sendInitialEvents(listener);
                    listeners.add(listener);
                }
View Full Code Here

Examples of org.osgi.service.blueprint.container.BlueprintListener

        }
        this.eventAdminListener = listener;

        this.containerListenerTracker = new ServiceTracker(bundleContext, BlueprintListener.class.getName(), new ServiceTrackerCustomizer() {
            public Object addingService(ServiceReference reference) {
                BlueprintListener listener = (BlueprintListener) bundleContext.getService(reference);

                synchronized (listeners) {
                    sendInitialEvents(listener);
                    listeners.add(listener);
                }
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.