2 * ===============================LICENSE_START======================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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===========================================
21 package org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap;
23 import co.cask.cdap.api.annotation.Description;
24 import co.cask.cdap.api.annotation.Macro;
25 import com.google.common.base.Objects;
27 import javax.annotation.Nullable;
30 * DMaaP MR Subscriber Config
32 * @author Rajiv Singla . Creation Date: 1/17/2017.
34 public class DMaaPMRSourcePluginConfig extends BaseDMaaPMRPluginConfig {
36 private static final long serialVersionUID = 1L;
38 @Description("DMaaP MR Polling Interval in MS")
40 protected Integer pollingInterval;
42 @Description("DMaaP Message Router Subscriber Consumer ID. Defaults to some randomly created userID")
45 protected String consumerId;
47 @Description("DMaaP Message Router Subscriber Consumer Group. Defaults to some randomly created user Group")
50 protected String consumerGroup;
52 @Description("DMaaP Message Router Subscriber Timeout in MS. Defaults to no timeout")
55 protected Integer timeoutMS;
57 @Description("DMaaP Message Router Subscriber Message Limit. Defaults to no message limit")
60 protected Integer messageLimit;
62 // Required No Arg constructor
63 public DMaaPMRSourcePluginConfig() {
64 this(null, null, null, 0);
67 public DMaaPMRSourcePluginConfig(String referenceName, String hostName, String topicName, Integer pollingInterval) {
68 super(referenceName, hostName, topicName);
69 this.pollingInterval = pollingInterval;
73 * DMaaP MR Subscriber Polling interval
75 * @return DMaaP MR Subscriber Polling interval
77 public Integer getPollingInterval() {
78 return pollingInterval;
82 * DMaaP MR Subscriber Consumer ID
84 * @return DMaaP MR Subscriber Consumer ID
87 public String getConsumerId() {
92 * DMaaP MR Subscriber Consumer Group
94 * @return DMaaP MR Subscriber Consumer Group
97 public String getConsumerGroup() {
102 * DMaaP MR Subscriber Timeout in MS
104 * @return DMaaP MR Subscriber Timeout in MS
107 public Integer getTimeoutMS() {
112 * DMaaP MR Subscriber message limit
114 * @return DMaaP MR Subscriber Message limit
117 public Integer getMessageLimit() {
123 public String toString() {
124 return Objects.toStringHelper(this)
125 .add("super", super.toString())
126 .add("pollingInterval", pollingInterval)
127 .add("consumerId", consumerId)
128 .add("consumerGroup", consumerGroup)
129 .add("timeoutMS", timeoutMS)
130 .add("messageLimit", messageLimit)