- return new ServiceStatus(s.getName(), s.getKeepAliveInterval().toSeconds(), s.timeSinceLastPing().toSeconds());
+ return new ServiceStatus(s.getName(), s.getKeepAliveInterval().toSeconds(), s.timeSinceLastPing().toSeconds(),
+ s.getCallbackUrl());
+ }
+
+ private void validateRegistrationInfo(ServiceRegistrationInfo registrationInfo) throws ServiceException {
+ if (registrationInfo.serviceName.isEmpty()) {
+ throw new ServiceException("Missing mandatory parameter 'serviceName'");
+ }
+ if (registrationInfo.keepAliveIntervalSeconds < 0) {
+ throw new ServiceException("Keepalive interval shoul be greater or equal to 0");
+ }