/** * Used at runtime startup to set the monitor levels based on a contribution name. * * @param levels the mapping of classes-loggers to monitor level */ @Property(required = false) public void setContributionLevels(Element levels) { NodeList list = levels.getElementsByTagName("level"); for (int i = 0; i < list.getLength(); i++) { Element element = (Element) list.item(i); String name = element.getAttribute("name"); String level = element.getAttribute("value"); setContributionLevel(name, level); } }
/** * Used at runtime startup to set the monitor levels based on a provider key. e.g a LogBack or Commons Logging key. * * @param levels the mapping of classes-loggers to monitor level */ @Property(required = false) public void setProviderLevels(Element levels) { NodeList list = levels.getElementsByTagName("level"); for (int i = 0; i < list.getLength(); i++) { Element element = (Element) list.item(i); String name = element.getAttribute("name"); String level = element.getAttribute("value"); setProviderLevel(name, level); } }
/** * Used at runtime startup to set the monitor levels for components contained in a deployable composite. * * @param levels the mapping of composite name to monitor level. */ @Property(required = false) public void setDeployableLevels(Element levels) { this.deployableLevels = new HashMap<QName, MonitorLevel>(); NodeList list = levels.getElementsByTagName("level"); for (int i = 0; i < list.getLength(); i++) { Element element = (Element) list.item(i); String value = element.getAttribute("value").toUpperCase(); MonitorLevel level = MonitorLevel.valueOf(value.toUpperCase()); deployableLevels.put(getQualifiedName(element), level); } }
private static Connector createConnector(ComponentManager componentManager, DefaultTransformerRegistry transformerRegistry, MonitorProxyService monitorService) { Map<Class<?>, SourceWireAttacher<?>> sourceAttachers = new HashMap<>(); SystemSourceWireAttacher wireAttacher = new SystemSourceWireAttacher(componentManager, transformerRegistry); sourceAttachers.put(SystemWireSource.class, wireAttacher); sourceAttachers.put(SingletonWireSource.class, new SingletonSourceWireAttacher(componentManager)); Map<Class<?>, TargetWireAttacher<?>> targetAttachers = new HashMap<>(); targetAttachers.put(SingletonWireTarget.class, new SingletonTargetWireAttacher(componentManager)); targetAttachers.put(SystemWireTarget.class, new SystemTargetWireAttacher(componentManager)); targetAttachers.put(MonitorWireTarget.class, new MonitorWireAttacher(monitorService, componentManager)); return new ConnectorImpl(sourceAttachers, targetAttachers); }
/** * Used at runtime startup to set the monitor levels based on a contribution name. * * @param levels the mapping of classes-loggers to monitor level */ @Property(required = false) @Source("$systemConfig//f3:runtime/f3:monitor/f3:contribution.levels") public void setContributionLevels(Element levels) { NodeList list = levels.getElementsByTagName("level"); for (int i = 0; i < list.getLength(); i++) { Element element = (Element) list.item(i); String name = element.getAttribute("name"); String level = element.getAttribute("value"); setContributionLevel(name, level); } }
/** * Used at runtime startup to set the monitor levels based on a provider key. e.g a LogBack or Commons Logging key. * * @param levels the mapping of classes-loggers to monitor level */ @Property(required = false) @Source("$systemConfig//f3:runtime/f3:monitor/f3:provider.levels") public void setProviderLevels(Element levels) { NodeList list = levels.getElementsByTagName("level"); for (int i = 0; i < list.getLength(); i++) { Element element = (Element) list.item(i); String name = element.getAttribute("name"); String level = element.getAttribute("value"); setProviderLevel(name, level); } }
private static Connector createConnector(ComponentManager componentManager, DefaultTransformerRegistry transformerRegistry, MonitorProxyService monitorService) { Map<Class<?>, SourceWireAttacher<?>> sourceAttachers = new HashMap<>(); SystemSourceWireAttacher wireAttacher = new SystemSourceWireAttacher(componentManager, transformerRegistry); sourceAttachers.put(SystemWireSource.class, wireAttacher); sourceAttachers.put(SingletonWireSource.class, new SingletonSourceWireAttacher(componentManager)); Map<Class<?>, TargetWireAttacher<?>> targetAttachers = new HashMap<>(); targetAttachers.put(SingletonWireTarget.class, new SingletonTargetWireAttacher(componentManager)); targetAttachers.put(SystemWireTarget.class, new SystemTargetWireAttacher(componentManager)); targetAttachers.put(MonitorWireTarget.class, new MonitorWireAttacher(monitorService, componentManager)); return new ConnectorImpl(sourceAttachers, targetAttachers); }
/** * Used at runtime startup to set the monitor levels based on a contribution name. * * @param levels the mapping of classes-loggers to monitor level */ @Property(required = false) @Source("$systemConfig//f3:runtime/f3:monitor/f3:contribution.levels") public void setContributionLevels(Element levels) { NodeList list = levels.getElementsByTagName("level"); for (int i = 0; i < list.getLength(); i++) { Element element = (Element) list.item(i); String name = element.getAttribute("name"); String level = element.getAttribute("value"); setContributionLevel(name, level); } }
/** * Used at runtime startup to set the monitor levels based on a provider key. e.g a LogBack or Commons Logging key. * * @param levels the mapping of classes-loggers to monitor level */ @Property(required = false) @Source("$systemConfig//f3:runtime/f3:monitor/f3:provider.levels") public void setProviderLevels(Element levels) { NodeList list = levels.getElementsByTagName("level"); for (int i = 0; i < list.getLength(); i++) { Element element = (Element) list.item(i); String name = element.getAttribute("name"); String level = element.getAttribute("value"); setProviderLevel(name, level); } }
private static Connector createConnector(ComponentManager componentManager, DefaultTransformerRegistry transformerRegistry, ClassLoaderRegistry classLoaderRegistry, MonitorProxyService monitorService) { Map<Class<? extends PhysicalSourceDefinition>, SourceWireAttacher<? extends PhysicalSourceDefinition>> sourceAttachers = new ConcurrentHashMap<Class<? extends PhysicalSourceDefinition>, SourceWireAttacher<? extends PhysicalSourceDefinition>>(); SystemSourceWireAttacher wireAttacher = new SystemSourceWireAttacher(componentManager, transformerRegistry, classLoaderRegistry); sourceAttachers.put(SystemSourceDefinition.class, wireAttacher); sourceAttachers.put(SingletonSourceDefinition.class, new SingletonSourceWireAttacher(componentManager)); Map<Class<? extends PhysicalTargetDefinition>, TargetWireAttacher<? extends PhysicalTargetDefinition>> targetAttachers = new ConcurrentHashMap<Class<? extends PhysicalTargetDefinition>, TargetWireAttacher<? extends PhysicalTargetDefinition>>(); targetAttachers.put(SingletonTargetDefinition.class, new SingletonTargetWireAttacher(componentManager)); targetAttachers.put(SystemTargetDefinition.class, new SystemTargetWireAttacher(componentManager, classLoaderRegistry)); targetAttachers.put(MonitorTargetDefinition.class, new MonitorWireAttacher(monitorService, componentManager, classLoaderRegistry)); ConnectorImpl connector = new ConnectorImpl(); connector.setSourceAttachers(sourceAttachers); connector.setTargetAttachers(targetAttachers); return connector; }