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); }
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); }
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; }