public static <S, T> Dictionary<S, T> singletonDictionary(S s, T t) { return toDictionary(Collections.singletonMap(s, t)); }
public static <S, T> Dictionary<S, T> singletonDictionary(S s, T t) { return toDictionary(Collections.singletonMap(s, t)); }
private void registerBusAsService() { BundleContext context = bus.getExtension(BundleContext.class); if (context != null) { Map<String, Object> props = new HashMap<>(); props.put(CONTEXT_SYMBOLIC_NAME_PROPERTY, context.getBundle().getSymbolicName()); props.put(CONTEXT_VERSION_PROPERTY, getBundleVersion(context.getBundle())); props.put(CONTEXT_NAME_PROPERTY, bus.getId()); service = context.registerService(Bus.class.getName(), bus, CollectionUtils.toDictionary(props)); } }
private void registerBusAsService() { BundleContext context = bus.getExtension(BundleContext.class); if (context != null) { Map<String, Object> props = new HashMap<>(); props.put(CONTEXT_SYMBOLIC_NAME_PROPERTY, context.getBundle().getSymbolicName()); props.put(CONTEXT_VERSION_PROPERTY, getBundleVersion(context.getBundle())); props.put(CONTEXT_NAME_PROPERTY, bus.getId()); service = context.registerService(Bus.class.getName(), bus, CollectionUtils.toDictionary(props)); } }
private void createCXFBus() { BlueprintBus bp = new BlueprintBus(); bp.setBundleContext(bundleContext); bp.setBlueprintContainer(container); bp.setId("WS-Notification"); bp.initialize(); if (null != bundleContext) { Map<String, Object> props = new HashMap<>(); props.put(CONTEXT_SYMBOLIC_NAME_PROPERTY, bundleContext.getBundle().getSymbolicName()); props.put(CONTEXT_VERSION_PROPERTY, getBundleVersion(bundleContext.getBundle())); props.put(CONTEXT_NAME_PROPERTY, bp.getId()); bundleContext.registerService(Bus.class.getName(), bp, CollectionUtils.toDictionary(props)); } cxfBus = bp; } private Version getBundleVersion(Bundle bundle) {