Code Review
/
nonrtric.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Adapted to latest STD A1 API spec
[nonrtric.git]
/
policy-agent
/
src
/
main
/
java
/
org
/
oransc
/
policyagent
/
repository
/
Service.java
diff --git
a/policy-agent/src/main/java/org/oransc/policyagent/repository/Service.java
b/policy-agent/src/main/java/org/oransc/policyagent/repository/Service.java
index
6a26b98
..
6458dbb
100644
(file)
--- a/
policy-agent/src/main/java/org/oransc/policyagent/repository/Service.java
+++ b/
policy-agent/src/main/java/org/oransc/policyagent/repository/Service.java
@@
-17,6
+17,7
@@
* limitations under the License.
* ========================LICENSE_END===================================
*/
* limitations under the License.
* ========================LICENSE_END===================================
*/
+
package org.oransc.policyagent.repository;
import java.time.Duration;
package org.oransc.policyagent.repository;
import java.time.Duration;
@@
-26,19
+27,20
@@
public class Service {
private final String name;
private final Duration keepAliveInterval;
private Instant lastPing;
private final String name;
private final Duration keepAliveInterval;
private Instant lastPing;
- // private final String callbackUrl1; // TBD
+ private final String callbackUrl;
- public Service(String name, Duration keepAliveInterval) {
+ public Service(String name, Duration keepAliveInterval
, String callbackUrl
) {
this.name = name;
this.keepAliveInterval = keepAliveInterval;
this.name = name;
this.keepAliveInterval = keepAliveInterval;
+ this.callbackUrl = callbackUrl;
ping();
}
ping();
}
- public String getName() {
+ public
synchronized
String getName() {
return this.name;
}
return this.name;
}
- public Duration getKeepAliveInterval() {
+ public
synchronized
Duration getKeepAliveInterval() {
return this.keepAliveInterval;
}
return this.keepAliveInterval;
}
@@
-54,4
+56,8
@@
public class Service {
return Duration.between(this.lastPing, Instant.now());
}
return Duration.between(this.lastPing, Instant.now());
}
+ public synchronized String getCallbackUrl() {
+ return this.callbackUrl;
+ }
+
}
}