2 * ===============================LICENSE_START======================================
\r
4 * ================================================================================
\r
5 * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
\r
6 * ================================================================================
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
18 * ============================LICENSE_END===========================================
\r
21 package org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap;
\r
23 import co.cask.cdap.api.annotation.Description;
\r
24 import co.cask.cdap.api.annotation.Macro;
\r
25 import com.google.common.base.Objects;
\r
27 import javax.annotation.Nullable;
\r
30 * DMaaP MR Subscriber Config
\r
32 * @author Rajiv Singla . Creation Date: 1/17/2017.
\r
34 public class DMaaPMRSourcePluginConfig extends BaseDMaaPMRPluginConfig {
\r
36 private static final long serialVersionUID = 1L;
\r
38 @Description("DMaaP MR Polling Interval in MS")
\r
40 protected Integer pollingInterval;
\r
42 @Description("DMaaP Message Router Subscriber Consumer ID. Defaults to some randomly created userID")
\r
45 protected String consumerId;
\r
47 @Description("DMaaP Message Router Subscriber Consumer Group. Defaults to some randomly created user Group")
\r
50 protected String consumerGroup;
\r
52 @Description("DMaaP Message Router Subscriber Timeout in MS. Defaults to no timeout")
\r
55 protected Integer timeoutMS;
\r
57 @Description("DMaaP Message Router Subscriber Message Limit. Defaults to no message limit")
\r
60 protected Integer messageLimit;
\r
62 // Required No Arg constructor
\r
63 public DMaaPMRSourcePluginConfig() {
\r
64 this(null, null, null, 0);
\r
67 public DMaaPMRSourcePluginConfig(String referenceName, String hostName, String topicName, Integer pollingInterval) {
\r
68 super(referenceName, hostName, topicName);
\r
69 this.pollingInterval = pollingInterval;
\r
73 * DMaaP MR Subscriber Polling interval
\r
75 * @return DMaaP MR Subscriber Polling interval
\r
77 public Integer getPollingInterval() {
\r
78 return pollingInterval;
\r
82 * DMaaP MR Subscriber Consumer ID
\r
84 * @return DMaaP MR Subscriber Consumer ID
\r
87 public String getConsumerId() {
\r
92 * DMaaP MR Subscriber Consumer Group
\r
94 * @return DMaaP MR Subscriber Consumer Group
\r
97 public String getConsumerGroup() {
\r
98 return consumerGroup;
\r
102 * DMaaP MR Subscriber Timeout in MS
\r
104 * @return DMaaP MR Subscriber Timeout in MS
\r
107 public Integer getTimeoutMS() {
\r
112 * DMaaP MR Subscriber message limit
\r
114 * @return DMaaP MR Subscriber Message limit
\r
117 public Integer getMessageLimit() {
\r
118 return messageLimit;
\r
123 public String toString() {
\r
124 return Objects.toStringHelper(this)
\r
125 .add("super", super.toString())
\r
126 .add("pollingInterval", pollingInterval)
\r
127 .add("consumerId", consumerId)
\r
128 .add("consumerGroup", consumerGroup)
\r
129 .add("timeoutMS", timeoutMS)
\r
130 .add("messageLimit", messageLimit)
\r