@Test public void testIsProxy() throws Exception { BundleContext bc = mockBundleContext(); GuardProxyCatalog gpc = new GuardProxyCatalog(bc); Dictionary<String, Object> props = new Hashtable<>(); props.put(GuardProxyCatalog.PROXY_SERVICE_KEY, Boolean.TRUE); assertTrue(gpc.isProxy(mockServiceReference(props))); assertFalse(gpc.isProxy(mockServiceReference(new Hashtable<>()))); }
boolean isProxy(ServiceReference<?> sr) { return sr.getProperty(PROXY_SERVICE_KEY) != null; }
GuardProxyCatalog implements ServiceListener { boolean isProxy(ServiceReference<?> sr) { return sr.getProperty(PROXY_SERVICE_KEY) != null; } }
GuardProxyCatalog implements ServiceListener { boolean isProxy(ServiceReference<?> sr) { return sr.getProperty(PROXY_SERVICE_KEY) != null; } GuardProxyCatalog(BundleContext bc); }
GuardProxyCatalog implements ServiceListener { boolean isProxy(ServiceReference<?> sr) { return sr.getProperty(PROXY_SERVICE_KEY) != null; } GuardProxyCatalog(BundleContext bc); @Override void serviceChanged(ServiceEvent event); }
GuardProxyCatalog implements ServiceListener { boolean isProxy(ServiceReference<?> sr) { return sr.getProperty(PROXY_SERVICE_KEY) != null; } GuardProxyCatalog(BundleContext bc); @Override void serviceChanged(ServiceEvent event); static final String KARAF_SECURED_SERVICES_SYSPROP; static final String SERVICE_GUARD_ROLES_PROPERTY; static final String KARAF_SECURED_COMMAND_COMPULSORY_ROLES_PROPERTY; }