X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=policy-agent%2Fsrc%2Fmain%2Fjava%2Forg%2Foransc%2Fpolicyagent%2Fcontrollers%2FServiceController.java;h=8996376c12b4d79650227e867d39dc6507029e46;hb=9fb9f6e4fe8eb9425d848ae576c0e755dfca22df;hp=cc1d711bb2ecde80107900f4732d7cc6677973f4;hpb=ebfa288c54e3de9ffb6e170b599e23ab0dbe479c;p=nonrtric.git diff --git a/policy-agent/src/main/java/org/oransc/policyagent/controllers/ServiceController.java b/policy-agent/src/main/java/org/oransc/policyagent/controllers/ServiceController.java index cc1d711b..8996376c 100644 --- a/policy-agent/src/main/java/org/oransc/policyagent/controllers/ServiceController.java +++ b/policy-agent/src/main/java/org/oransc/policyagent/controllers/ServiceController.java @@ -71,7 +71,7 @@ public class ServiceController { Collection servicesStatus = new Vector<>(); synchronized (this.services) { for (Service s : this.services.getAll()) { - if (name == null || name.equals(s.name())) { + if (name == null || name.equals(s.getName())) { servicesStatus.add(toServiceStatus(s)); } } @@ -83,7 +83,7 @@ public class ServiceController { private ServiceStatus toServiceStatus(Service s) { return ImmutableServiceStatus.builder() // - .name(s.name()) // + .name(s.getName()) // .keepAliveInterval(s.getKeepAliveInterval().toSeconds()) // .timeSincePing(s.timeSinceLastPing().toSeconds()) // .build(); @@ -118,14 +118,14 @@ public class ServiceController { private Service removeService(String name) throws ServiceException { synchronized (this.services) { Service service = this.services.getService(name); - this.services.remove(service.name()); + this.services.remove(service.getName()); return service; } } private void removePolicies(Service service) { synchronized (this.policies) { - Vector policyList = new Vector<>(this.policies.getForService(service.name())); + Vector policyList = new Vector<>(this.policies.getForService(service.getName())); for (Policy policy : policyList) { this.policies.remove(policy); }