Collection<ServiceStatus> 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));
}
}
private ServiceStatus toServiceStatus(Service s) {
return ImmutableServiceStatus.builder() //
- .name(s.name()) //
+ .name(s.getName()) //
.keepAliveInterval(s.getKeepAliveInterval().toSeconds()) //
.timeSincePing(s.timeSinceLastPing().toSeconds()) //
.build();
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<Policy> policyList = new Vector<>(this.policies.getForService(service.name()));
+ Vector<Policy> policyList = new Vector<>(this.policies.getForService(service.getName()));
for (Policy policy : policyList) {
this.policies.remove(policy);
}