diff options
Diffstat (limited to 'app-c/appc/appc-metric/appc-metric-bundle/src/main/java/org/openecomp/appc/metricservice/metric/impl/DmaapRequestCounterBuilderImpl.java')
-rw-r--r-- | app-c/appc/appc-metric/appc-metric-bundle/src/main/java/org/openecomp/appc/metricservice/metric/impl/DmaapRequestCounterBuilderImpl.java | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/app-c/appc/appc-metric/appc-metric-bundle/src/main/java/org/openecomp/appc/metricservice/metric/impl/DmaapRequestCounterBuilderImpl.java b/app-c/appc/appc-metric/appc-metric-bundle/src/main/java/org/openecomp/appc/metricservice/metric/impl/DmaapRequestCounterBuilderImpl.java new file mode 100644 index 000000000..65aefed3e --- /dev/null +++ b/app-c/appc/appc-metric/appc-metric-bundle/src/main/java/org/openecomp/appc/metricservice/metric/impl/DmaapRequestCounterBuilderImpl.java @@ -0,0 +1,64 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : APP-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.appc.metricservice.metric.impl; + +import org.openecomp.appc.metricservice.metric.MetricType; +import org.openecomp.appc.metricservice.metric.DmaapRequestCounterBuilder; +import org.openecomp.appc.metricservice.metric.DmaapRequestCounterMetric; + + +public class DmaapRequestCounterBuilderImpl implements DmaapRequestCounterBuilder { + private String name; + private MetricType metricType; + private long recievedMessage; + private long publishedMessage; + + @Override + public DmaapRequestCounterBuilder withName(String name) { + this.name=name; + return this; + } + + @Override + public DmaapRequestCounterBuilder withRecievedMessage(long value) { + + this.recievedMessage=value; + return this; + } + + @Override + public DmaapRequestCounterBuilder withPublishedMessage(long value) { + this.publishedMessage=value; + return this; + } + + @Override + public DmaapRequestCounterBuilder withType(MetricType type) { + this.metricType=type; + return this; + } + + @Override + public DmaapRequestCounterMetric build() { + return new DmaapRequestCounterMetricImpl(this.name,this.metricType,this.recievedMessage,this.publishedMessage); + } +} |