|
|
@ -16,10 +16,7 @@ import org.springframework.util.CollectionUtils;
|
|
|
|
import javax.annotation.PostConstruct;
|
|
|
|
import javax.annotation.PostConstruct;
|
|
|
|
import javax.annotation.PreDestroy;
|
|
|
|
import javax.annotation.PreDestroy;
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.Iterator;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import java.util.Optional;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Service
|
|
|
|
@Service
|
|
|
|
@Slf4j
|
|
|
|
@Slf4j
|
|
|
@ -104,9 +101,12 @@ public class RealTimeDataService {
|
|
|
|
@PreDestroy
|
|
|
|
@PreDestroy
|
|
|
|
private void stop() {
|
|
|
|
private void stop() {
|
|
|
|
log.info("关闭61850订阅服务.");
|
|
|
|
log.info("关闭61850订阅服务.");
|
|
|
|
|
|
|
|
List<Integer> idList = new ArrayList<>();
|
|
|
|
Iterator<Integer> it = clientMap.keySet().iterator();
|
|
|
|
Iterator<Integer> it = clientMap.keySet().iterator();
|
|
|
|
while (it.hasNext()) {
|
|
|
|
while (it.hasNext()) {
|
|
|
|
Integer iedId = it.next();
|
|
|
|
idList.add(it.next());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
for (Integer iedId : idList) {
|
|
|
|
this.onlyStop(iedId);
|
|
|
|
this.onlyStop(iedId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|