aboutsummaryrefslogtreecommitdiffstats
path: root/policy-endpoints/src/main/java/org/openecomp/policy/drools/event/comm/TopicEndpoint.java
diff options
context:
space:
mode:
Diffstat (limited to 'policy-endpoints/src/main/java/org/openecomp/policy/drools/event/comm/TopicEndpoint.java')
-rw-r--r--policy-endpoints/src/main/java/org/openecomp/policy/drools/event/comm/TopicEndpoint.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/policy-endpoints/src/main/java/org/openecomp/policy/drools/event/comm/TopicEndpoint.java b/policy-endpoints/src/main/java/org/openecomp/policy/drools/event/comm/TopicEndpoint.java
index fa73ecb7..337d78e5 100644
--- a/policy-endpoints/src/main/java/org/openecomp/policy/drools/event/comm/TopicEndpoint.java
+++ b/policy-endpoints/src/main/java/org/openecomp/policy/drools/event/comm/TopicEndpoint.java
@@ -26,6 +26,7 @@ import java.util.Properties;
import org.openecomp.policy.drools.event.comm.bus.DmaapTopicSink;
import org.openecomp.policy.drools.event.comm.bus.DmaapTopicSource;
+import org.openecomp.policy.drools.event.comm.bus.NoopTopicSink;
import org.openecomp.policy.drools.event.comm.bus.UebTopicSink;
import org.openecomp.policy.drools.event.comm.bus.UebTopicSource;
import org.slf4j.LoggerFactory;
@@ -181,6 +182,19 @@ public interface TopicEndpoint extends Startable, Lockable {
throws IllegalStateException, IllegalArgumentException;
/**
+ * get the no-op Topic Sink for the given topic name
+ *
+ * @param topicName the topic name
+ *
+ * @return the Topic Source
+ * @throws IllegalStateException if the entity is in an invalid state, for
+ * example multiple TopicReaders for a topic name and communication infrastructure
+ * @throws IllegalArgumentException if invalid parameters are present
+ */
+ public NoopTopicSink getNoopTopicSink(String topicName)
+ throws IllegalStateException, IllegalArgumentException;
+
+ /**
* get the DMAAP Topic Source for the given topic name
*
* @param topicName the topic name
@@ -224,6 +238,12 @@ public interface TopicEndpoint extends Startable, Lockable {
public List<DmaapTopicSink> getDmaapTopicSinks();
/**
+ * gets only the NOOP Topic Sinks
+ * @return the NOOP Topic Sinks List
+ */
+ public List<NoopTopicSink> getNoopTopicSinks();
+
+ /**
* singleton for global access
*/
public static final TopicEndpoint manager = new ProxyTopicEndpointManager();
@@ -287,6 +307,7 @@ class ProxyTopicEndpointManager implements TopicEndpoint {
sinks.addAll(UebTopicSink.factory.build(properties));
sinks.addAll(DmaapTopicSink.factory.build(properties));
+ sinks.addAll(NoopTopicSink.factory.build(properties));
if (this.isLocked()) {
for (TopicSink sink : sinks) {
@@ -321,6 +342,7 @@ class ProxyTopicEndpointManager implements TopicEndpoint {
sinks.addAll(UebTopicSink.factory.inventory());
sinks.addAll(DmaapTopicSink.factory.inventory());
+ sinks.addAll(NoopTopicSink.factory.inventory());
return sinks;
}
@@ -360,6 +382,15 @@ class ProxyTopicEndpointManager implements TopicEndpoint {
public List<DmaapTopicSink> getDmaapTopicSinks() {
return DmaapTopicSink.factory.inventory();
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @JsonIgnore
+ @Override
+ public List<NoopTopicSink> getNoopTopicSinks() {
+ return NoopTopicSink.factory.inventory();
+ }
/**
* {@inheritDoc}
@@ -689,5 +720,10 @@ class ProxyTopicEndpointManager implements TopicEndpoint {
public DmaapTopicSink getDmaapTopicSink(String topicName) throws IllegalStateException, IllegalArgumentException {
return DmaapTopicSink.factory.get(topicName);
}
+
+ @Override
+ public NoopTopicSink getNoopTopicSink(String topicName) throws IllegalStateException, IllegalArgumentException {
+ return NoopTopicSink.factory.get(topicName);
+ }
}