aboutsummaryrefslogtreecommitdiffstats
path: root/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/Topic.java
diff options
context:
space:
mode:
authorJorge Hernandez <jorge.hernandez-herrero@att.com>2019-02-19 20:05:31 -0600
committerJorge Hernandez <jorge.hernandez-herrero@att.com>2019-02-21 11:01:09 -0600
commit4c1c6891ed6cd4a9e5c2e0b3bacd0c2df89364a7 (patch)
tree36d229cab77b42d3c2504ce7ebe1f94d656e94da /policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/Topic.java
parent2917a67f12e32a7337e3a9f9b9fd3de4469a921c (diff)
Support for lab contextual topic names.
This work allows a drools application, with its drl template to refer to the topic name by its invariable canonical name, ie. POLICY-CL-MGT. Since the drl is a design time artifact, it is desired to know topics by its canonical non-changeable name. The actual per lab environment topic name may change on a per deployment basis, for example POLICY-CL-MGT-WINDRIVER or POLICY-CL-MGT-TLAB. The template can still use POLICY-CL-MGT without modification but the actual installation configuration would use the "effectiveTopic" property to point to the right topic on a per lab basis. This also helps with installation (long story) since the canonical topics will be known ahead of time. Change-Id: I8322bf7e427569c37a76eea5ce6d5b9547cb2ff3 Issue-ID: POLICY-1534 Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
Diffstat (limited to 'policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/Topic.java')
-rw-r--r--policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/Topic.java25
1 files changed, 17 insertions, 8 deletions
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/Topic.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/Topic.java
index 800fcce4..96c00c77 100644
--- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/Topic.java
+++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/Topic.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * policy-endpoints
+ * ONAP
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Samsung Electronics Co., Ltd.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -35,7 +35,7 @@ public interface Topic extends TopicRegisterable, Startable, Lockable {
/**
* Underlying Communication infrastructure Types.
*/
- public enum CommInfrastructure {
+ enum CommInfrastructure {
/**
* UEB Communication Infrastructure.
*/
@@ -55,31 +55,40 @@ public interface Topic extends TopicRegisterable, Startable, Lockable {
}
/**
- * Gets the topic name.
+ * Gets the canonical topic name.
*
* @return topic name
*/
- public String getTopic();
+ String getTopic();
+
+ /**
+ * Gets the effective topic that is used in
+ * the network communication. This name is usually
+ * the topic name.
+ *
+ * @return topic name alias
+ */
+ String getEffectiveTopic();
/**
* Gets the communication infrastructure type.
*
* @return CommInfrastructure object
*/
- public CommInfrastructure getTopicCommInfrastructure();
+ CommInfrastructure getTopicCommInfrastructure();
/**
* Return list of servers.
*
* @return bus servers
*/
- public List<String> getServers();
+ List<String> getServers();
/**
* Get the more recent events in this topic entity.
*
* @return list of most recent events
*/
- public String[] getRecentEvents();
+ String[] getRecentEvents();
}