Examples of ServiceTracker


Examples of org.osgi.util.tracker.ServiceTracker

            filter = bundleContext.createFilter("(jackrabbit.extension=true)");
        } catch (InvalidSyntaxException e) {
            //Should not happen
            throw new RuntimeException("Invalid filter", e);
        }
        this.tracker = new ServiceTracker(bundleContext, filter, this);
    }
View Full Code Here

Examples of org.osgi.util.tracker.ServiceTracker

            public void sendEvent(Event event) {
                addEvent(event);
            }
        };

        ServiceTracker tracker = mock(ServiceTracker.class);
        when(tracker.getService()).thenReturn(mockEA);

        BundleContext bundleContext = mock(BundleContext.class);
        when(bundleContext.createFilter(any(String.class))).thenReturn(null);
        when(bundleContext.getServiceReference(any(String.class))).thenReturn(null);
        when(bundleContext.getService(null)).thenReturn(mockEA);
View Full Code Here

Examples of org.osgi.util.tracker.ServiceTracker

        }
        // invariant: moduleCache is null or modules have changed

        // tracker may be null if moduleCache is null
        if (loginModuleTracker == null) {
            loginModuleTracker = new ServiceTracker(getBundleContext(),
                LoginModulePlugin.class.getName(), null);
            loginModuleTracker.open();
        }

        if (moduleCache == null || lastTrackingCount < loginModuleTracker.getTrackingCount()) {
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.