Sonar Critical Fix
[dcaegen2/analytics/tca.git] / dcae-analytics-it / src / test / java / org / openecomp / dcae / apod / analytics / it / dmaap / DMaaPMRCreator.java
1 /*
2  * ===============================LICENSE_START======================================
3  *  dcae-analytics
4  * ================================================================================
5  *    Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  *  Licensed under the Apache License, Version 2.0 (the "License");
8  *  you may not use this file except in compliance with the License.
9  *   You may obtain a copy of the License at
10  *
11  *          http://www.apache.org/licenses/LICENSE-2.0
12  *
13  *  Unless required by applicable law or agreed to in writing, software
14  *  distributed under the License is distributed on an "AS IS" BASIS,
15  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  *  See the License for the specific language governing permissions and
17  *  limitations under the License.
18  *  ============================LICENSE_END===========================================
19  */
20
21 package org.openecomp.dcae.apod.analytics.it.dmaap;
22
23 import org.openecomp.dcae.apod.analytics.dmaap.service.publisher.DMaaPMRPublisher;
24 import org.openecomp.dcae.apod.analytics.dmaap.service.subscriber.DMaaPMRSubscriber;
25
26 import java.util.Map;
27
28 /**
29  * Creates DMaaP MR Publisher and Subscriber Instances for Integration Testing purposes
30  * <p>
31  * @author Rajiv Singla . Creation Date: 2/1/2017.
32  */
33 public interface DMaaPMRCreator {
34
35     /**
36      * Provides {@link DMaaPMRSubscriber} instance for Integration testing configured for the specific test
37      * environment
38      *
39      * @return DMaaP MR Subscriber instance for integration testing
40      */
41     DMaaPMRSubscriber getDMaaPMRSubscriber();
42
43
44     /**
45      * Provides {@link DMaaPMRSubscriber} instance for Integration testing configured with given topic name
46      *
47      * @param subscriberTopicName DMaaP MR Subscriber Topic Name
48      * @return DMaaP MR Subscriber instance which is subscriber to given subscriber topic
49      */
50     DMaaPMRSubscriber getDMaaPMRSubscriberWithTopicName(String subscriberTopicName);
51
52     /**
53      * Provides {@link DMaaPMRPublisher} instance for Integration testing configured for the specific test
54      * environment
55      *
56      * @return DMaaP MR Publisher instance for integration testing
57      */
58     DMaaPMRPublisher getDMaaPMRPublisher();
59
60
61     /**
62      * Provides {@link DMaaPMRPublisher} instance for Integration testing configured with given topic name
63      *
64      * @param publisherTopicName DMaaP MR publisher topic name
65      * @return DMaaP MR Publisher instance for integration testing
66      */
67     DMaaPMRPublisher getDMaaPMRPublisherWithTopicName(String publisherTopicName);
68
69     /**
70      * Provides a map of DMaaP subscriber config for Integration testing configured with given topic name
71      *
72      * @return Map of key-value pair of subscriber config
73      */
74     Map<String, String> getDMaaPMRSubscriberConfig();
75
76     /**
77      * Provides a map of DMaaP publisher config for Integration testing configured with given topic name
78      *
79      * @return Map of key-value pair of publisher config
80      */
81     Map<String, String> getDMaaPMRPublisherConfig();
82
83 }