| | |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | | import com.battery.device.api.NoopDeviceAdapterFactory; |
| | | import com.battery.device.bts.BtsDeviceAdapterFactory; |
| | | import com.battery.device.bts.NewareBtsAdapterFactory; |
| | | import com.battery.device.api.registry.DeviceAdapterRegistry; |
| | | import com.battery.device.neware.NewareMysqlAdapterFactory; |
| | | import com.battery.business.mapper.TDeviceIngestRecordMapper; |
| | |
| | | @EnableScheduling |
| | | public class DeviceAdapterRuntimeConfig |
| | | { |
| | | /** 装配持有全部可用工厂的适配器注册表;推式来源工厂使用业务落地表 Mapper,实例由配置或代码另行注册。 */ |
| | | @Bean(destroyMethod = "close") |
| | | public DeviceAdapterRegistry deviceAdapterRegistry(TDeviceIngestRecordMapper ingestRecords) |
| | | { |
| | | return new DeviceAdapterRegistry(List.of(new NoopDeviceAdapterFactory(), new BtsDeviceAdapterFactory(), |
| | | new NewareMysqlAdapterFactory(), new PushIngestAdapterFactory(ingestRecords))); |
| | | new NewareBtsAdapterFactory(), new NewareMysqlAdapterFactory(), |
| | | new PushIngestAdapterFactory(ingestRecords))); |
| | | } |
| | | } |