From: Piotr Jaszczyk Date: Wed, 9 Jan 2019 14:08:46 +0000 (+0100) Subject: High Volume VES Collector Client - stub X-Git-Tag: 1.1.3~32 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F63%2F75563%2F10;p=dcaegen2%2Fservices%2Fsdk.git High Volume VES Collector Client - stub Other minor changes: * Set dependencies to compatible versions (spring, spring-boot and reactor + reactor-netty) * Fix compilation errors on Java 11 Change-Id: If482c0dffd7162315df6d7b7fdedf554ef7c5d9d Issue-ID: DCAEGEN2-1070 Signed-off-by: Piotr Jaszczyk --- diff --git a/pom.xml b/pom.xml index c3fa0925..000f839d 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ org.onap.dcaegen2.services sdk - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT dcaegen2-services-sdk Common SDK repo for all DCAE Services (R4) @@ -30,14 +30,17 @@ 5.3.1 1.3.1 2.7.3 - 5.1.2.RELEASE - 2.1.0.RELEASE + 5.1.3.RELEASE + 2.1.1.RELEASE + Californium-SR3 1.7.25 - 2.16.0 + 1.2.3 + 2.23.4 rest-services + services security @@ -168,7 +171,8 @@ ch.qos.logback logback-classic - 1.2.3 + ${logback.version} + runtime org.slf4j @@ -184,16 +188,12 @@ org.slf4j slf4j-api ${slf4j.version} - - - io.projectreactor.netty - reactor-netty - 0.8.1.RELEASE + compile io.projectreactor reactor-bom - Californium-SR2 + ${reactor.bom.version} pom import diff --git a/rest-services/aai-client/pom.xml b/rest-services/aai-client/pom.xml index 5492e0a3..c799fc92 100644 --- a/rest-services/aai-client/pom.xml +++ b/rest-services/aai-client/pom.xml @@ -7,13 +7,13 @@ org.onap.dcaegen2.services.sdk dcaegen2-services-sdk-rest-services - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT ../pom.xml org.onap.dcaegen2.services.sdk.rest.services aai-client - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT dcaegen2-services-sdk-rest-services-aai-client Active and Available Inventory Rest Services Module @@ -23,7 +23,7 @@ org.onap.dcaegen2.services.sdk.rest.services common-dependency - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT org.springframework diff --git a/rest-services/aai-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/AaiReactiveWebClientFactoryTest.java b/rest-services/aai-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/AaiReactiveWebClientFactoryTest.java index 153189fd..46a57b69 100644 --- a/rest-services/aai-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/AaiReactiveWebClientFactoryTest.java +++ b/rest-services/aai-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/AaiReactiveWebClientFactoryTest.java @@ -25,6 +25,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; +import io.netty.handler.ssl.SslContext; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.onap.dcaegen2.services.sdk.rest.services.aai.client.config.AaiClientConfiguration; @@ -42,6 +43,7 @@ class AaiReactiveWebClientFactoryTest { private SslFactory sslFactory = mock(SslFactory.class); private AaiClientConfiguration aaiClientConfiguration = mock(AaiClientConfiguration.class); private AaiReactiveWebClientFactory aaiReactiveWebClientFactory; + private SslContext dummySslContext = mock(SslContext.class); @Test void shouldCreateWebClientWithSecureSslContext() throws SSLException { @@ -56,17 +58,20 @@ class AaiReactiveWebClientFactoryTest { @Test void shouldCreateWebClientWithInsecureSslContext() throws SSLException { when(aaiClientConfiguration.enableAaiCertAuth()).thenReturn(false); + when(sslFactory.createInsecureContext()).thenReturn(dummySslContext); aaiReactiveWebClientFactory = new AaiReactiveWebClientFactory(sslFactory, aaiClientConfiguration); Assertions.assertNotNull(aaiReactiveWebClientFactory.build()); verify(sslFactory).createInsecureContext(); } - private void givenEnabledAaiCertAuthConfiguration() { + private void givenEnabledAaiCertAuthConfiguration() throws SSLException { when(aaiClientConfiguration.enableAaiCertAuth()).thenReturn(true); when(aaiClientConfiguration.trustStorePath()).thenReturn(TRUST_STORE_PATH); when(aaiClientConfiguration.trustStorePasswordPath()).thenReturn(TRUST_STORE_PASS_PATH); when(aaiClientConfiguration.keyStorePath()).thenReturn(KEY_STORE_PATH); when(aaiClientConfiguration.keyStorePasswordPath()).thenReturn(KEY_STORE_PASS_PATH); + when(sslFactory.createSecureContext(KEY_STORE_PATH, KEY_STORE_PASS_PATH, TRUST_STORE_PATH, TRUST_STORE_PASS_PATH)) + .thenReturn(dummySslContext); } } diff --git a/rest-services/cbs-client/pom.xml b/rest-services/cbs-client/pom.xml index c6484ff5..e1656e74 100644 --- a/rest-services/cbs-client/pom.xml +++ b/rest-services/cbs-client/pom.xml @@ -7,13 +7,13 @@ org.onap.dcaegen2.services.sdk dcaegen2-services-sdk-rest-services - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT ../pom.xml org.onap.dcaegen2.services.sdk.rest.services cbs-client - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT dcaegen2-services-sdk-rest-services-cbs-client Config Binding Service Rest Services Module diff --git a/rest-services/common-dependency/pom.xml b/rest-services/common-dependency/pom.xml index 39cac5da..46e52f05 100644 --- a/rest-services/common-dependency/pom.xml +++ b/rest-services/common-dependency/pom.xml @@ -8,13 +8,13 @@ org.onap.dcaegen2.services.sdk dcaegen2-services-sdk-rest-services - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT ../pom.xml org.onap.dcaegen2.services.sdk.rest.services common-dependency - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT dcaegen2-services-sdk-rest-services-common-dependency Common functionality in the project diff --git a/rest-services/dmaap-client/pom.xml b/rest-services/dmaap-client/pom.xml index e34dfa17..ec916052 100644 --- a/rest-services/dmaap-client/pom.xml +++ b/rest-services/dmaap-client/pom.xml @@ -7,13 +7,13 @@ org.onap.dcaegen2.services.sdk dcaegen2-services-sdk-rest-services - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT ../pom.xml org.onap.dcaegen2.services.sdk.rest.services dmaap-client - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT dcaegen2-services-sdk-rest-services-dmaap-client DMaaP Rest Services Module @@ -23,7 +23,7 @@ org.onap.dcaegen2.services.sdk.rest.services common-dependency - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT org.springframework @@ -68,7 +68,7 @@ org.onap.dcaegen2.services.sdk.rest.services aai-client - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT test diff --git a/rest-services/dmaap-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/service/consumer/DMaaPReactiveWebClientFactoryTest.java b/rest-services/dmaap-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/service/consumer/DMaaPReactiveWebClientFactoryTest.java index d28bc5d7..d9989d1d 100644 --- a/rest-services/dmaap-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/service/consumer/DMaaPReactiveWebClientFactoryTest.java +++ b/rest-services/dmaap-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/service/consumer/DMaaPReactiveWebClientFactoryTest.java @@ -24,6 +24,8 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; +import io.netty.handler.ssl.SslContext; +import javax.net.ssl.SSLException; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.config.DmaapConsumerConfiguration; @@ -40,6 +42,7 @@ class DMaaPReactiveWebClientFactoryTest { private static final String TRUST_STORE = "trustStore"; private static final String TRUST_STORE_PASS = "trustStorePass"; private SslFactory sslFactory = mock(SslFactory.class); + private SslContext dummySslContext = mock(SslContext.class); private DMaaPReactiveWebClientFactory webClientFactory = new DMaaPReactiveWebClientFactory(sslFactory); @Test @@ -68,19 +71,22 @@ class DMaaPReactiveWebClientFactoryTest { verify(sslFactory).createSecureContext(KEY_STORE, KEY_STORE_PASS, TRUST_STORE, TRUST_STORE_PASS); } - private DmaapConsumerConfiguration givenDmaapConfigurationWithSslDisabled() { + private DmaapConsumerConfiguration givenDmaapConfigurationWithSslDisabled() throws SSLException { DmaapConsumerConfiguration dmaapConsumerConfiguration = mock(DmaapConsumerConfiguration.class); when(dmaapConsumerConfiguration.enableDmaapCertAuth()).thenReturn(false); + when(sslFactory.createInsecureContext()).thenReturn(dummySslContext); return dmaapConsumerConfiguration; } - private DmaapConsumerConfiguration givenDmaapConfigurationWithSslEnabled() { + private DmaapConsumerConfiguration givenDmaapConfigurationWithSslEnabled() throws SSLException { DmaapConsumerConfiguration dmaapConsumerConfiguration = mock(DmaapConsumerConfiguration.class); when(dmaapConsumerConfiguration.enableDmaapCertAuth()).thenReturn(true); when(dmaapConsumerConfiguration.keyStorePath()).thenReturn(KEY_STORE); when(dmaapConsumerConfiguration.keyStorePasswordPath()).thenReturn(KEY_STORE_PASS); when(dmaapConsumerConfiguration.trustStorePath()).thenReturn(TRUST_STORE); when(dmaapConsumerConfiguration.trustStorePasswordPath()).thenReturn(TRUST_STORE_PASS); + when(sslFactory.createSecureContext(KEY_STORE, KEY_STORE_PASS, TRUST_STORE, TRUST_STORE_PASS)) + .thenReturn(dummySslContext); return dmaapConsumerConfiguration; } } \ No newline at end of file diff --git a/rest-services/pom.xml b/rest-services/pom.xml index 101e4f92..4272fa1b 100644 --- a/rest-services/pom.xml +++ b/rest-services/pom.xml @@ -7,13 +7,13 @@ org.onap.dcaegen2.services sdk - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT ../pom.xml org.onap.dcaegen2.services.sdk dcaegen2-services-sdk-rest-services - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT dcaegen2-services-sdk-rest-services Common SDK repo for all DCAE Services (R4) diff --git a/security/pom.xml b/security/pom.xml index e7da3c18..9c4412aa 100644 --- a/security/pom.xml +++ b/security/pom.xml @@ -7,7 +7,7 @@ org.onap.dcaegen2.services sdk - 1.0.0-SNAPSHOT + 1.1.1-SNAPSHOT ../pom.xml diff --git a/services/hv-ves-client/pom.xml b/services/hv-ves-client/pom.xml new file mode 100644 index 00000000..b2c5fcc8 --- /dev/null +++ b/services/hv-ves-client/pom.xml @@ -0,0 +1,43 @@ + + + + 4.0.0 + + + org.onap.dcaegen2.services.sdk + dcaegen2-services-sdk-services + 1.1.1-SNAPSHOT + .. + + + dcaegen2-services-sdk-services-hvvesclient + 1.1.1-SNAPSHOT + + High Volume VES Collector Client + + pom + + + producer + + diff --git a/services/hv-ves-client/producer/api/pom.xml b/services/hv-ves-client/producer/api/pom.xml new file mode 100644 index 00000000..c779c750 --- /dev/null +++ b/services/hv-ves-client/producer/api/pom.xml @@ -0,0 +1,46 @@ + + + + 4.0.0 + + + org.onap.dcaegen2.services.sdk + hvvesclient-producer + 1.1.1-SNAPSHOT + .. + + + hvvesclient-producer-api + 1.1.1-SNAPSHOT + + High Volume VES Collector Client :: Producer :: API + + jar + + + + org.reactivestreams + reactive-streams + + + diff --git a/services/hv-ves-client/producer/api/src/main/java/org/onap/dcaegen2/services/sdk/services/hvves/client/producer/api/HvVesProducer.java b/services/hv-ves-client/producer/api/src/main/java/org/onap/dcaegen2/services/sdk/services/hvves/client/producer/api/HvVesProducer.java new file mode 100644 index 00000000..e81fb13e --- /dev/null +++ b/services/hv-ves-client/producer/api/src/main/java/org/onap/dcaegen2/services/sdk/services/hvves/client/producer/api/HvVesProducer.java @@ -0,0 +1,30 @@ +/* + * ============LICENSE_START======================================================= + * DCAEGEN2-SERVICES-SDK + * ================================================================================ + * Copyright (C) 2019 Nokia. 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.onap.dcaegen2.services.sdk.services.hvves.client.producer.api; + +import org.reactivestreams.Publisher; + +/** + * @author Piotr Jaszczyk + * @since January 2019 + */ +public interface HvVesProducer { + Publisher send(Publisher messages); +} diff --git a/services/hv-ves-client/producer/api/src/main/java/org/onap/dcaegen2/services/sdk/services/hvves/client/producer/api/HvVesProducerFactory.java b/services/hv-ves-client/producer/api/src/main/java/org/onap/dcaegen2/services/sdk/services/hvves/client/producer/api/HvVesProducerFactory.java new file mode 100644 index 00000000..a13de421 --- /dev/null +++ b/services/hv-ves-client/producer/api/src/main/java/org/onap/dcaegen2/services/sdk/services/hvves/client/producer/api/HvVesProducerFactory.java @@ -0,0 +1,40 @@ +/* + * ============LICENSE_START======================================================= + * DCAEGEN2-SERVICES-SDK + * ================================================================================ + * Copyright (C) 2019 Nokia. 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.onap.dcaegen2.services.sdk.services.hvves.client.producer.api; + +import java.util.Iterator; +import java.util.ServiceLoader; + +/** + * @author Piotr Jaszczyk + * @since January 2019 + */ +public interface HvVesProducerFactory { + HvVesProducer create(); + + static HvVesProducerFactory getInstance() { + Iterator instances = ServiceLoader.load(HvVesProducerFactory.class).iterator(); + if (instances.hasNext()) { + return instances.next(); + } else { + throw new IllegalStateException("No ProducerFactory instances was configured. Are you sure you have runtime dependency on implementation module?"); + } + } +} diff --git a/services/hv-ves-client/producer/api/src/main/java/org/onap/dcaegen2/services/sdk/services/hvves/client/producer/api/package-info.java b/services/hv-ves-client/producer/api/src/main/java/org/onap/dcaegen2/services/sdk/services/hvves/client/producer/api/package-info.java new file mode 100644 index 00000000..490544dd --- /dev/null +++ b/services/hv-ves-client/producer/api/src/main/java/org/onap/dcaegen2/services/sdk/services/hvves/client/producer/api/package-info.java @@ -0,0 +1,25 @@ +/* + * ============LICENSE_START======================================================= + * DCAEGEN2-SERVICES-SDK + * ================================================================================ + * Copyright (C) 2019 Nokia. 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========================================================= + */ + +/** + * @author Piotr Jaszczyk + * @since January 2019 + */ +package org.onap.dcaegen2.services.sdk.services.hvves.client.producer.api; diff --git a/services/hv-ves-client/producer/ct/pom.xml b/services/hv-ves-client/producer/ct/pom.xml new file mode 100644 index 00000000..dd586132 --- /dev/null +++ b/services/hv-ves-client/producer/ct/pom.xml @@ -0,0 +1,64 @@ + + + + 4.0.0 + + + org.onap.dcaegen2.services.sdk + hvvesclient-producer + 1.1.1-SNAPSHOT + .. + + + hvvesclient-producer-ct + 1.1.1-SNAPSHOT + + High Volume VES Collector Client :: Producer :: Component Tests + + jar + + + + + org.onap.dcaegen2.services.sdk + hvvesclient-producer-api + ${project.version} + + + org.onap.dcaegen2.services.sdk + hvvesclient-producer-impl + ${project.version} + runtime + + + org.junit.jupiter + junit-jupiter-engine + + + io.projectreactor + reactor-test + test + + + + diff --git a/services/hv-ves-client/producer/ct/src/test/java/org/onap/dcaegen2/services/sdk/services/hvves/client/producer/ct/HvVesHvVesProducerIT.java b/services/hv-ves-client/producer/ct/src/test/java/org/onap/dcaegen2/services/sdk/services/hvves/client/producer/ct/HvVesHvVesProducerIT.java new file mode 100644 index 00000000..232d202c --- /dev/null +++ b/services/hv-ves-client/producer/ct/src/test/java/org/onap/dcaegen2/services/sdk/services/hvves/client/producer/ct/HvVesHvVesProducerIT.java @@ -0,0 +1,45 @@ +/* + * ============LICENSE_START======================================================= + * DCAEGEN2-SERVICES-SDK + * ================================================================================ + * Copyright (C) 2019 Nokia. 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.onap.dcaegen2.services.sdk.services.hvves.client.producer.ct; + +import org.junit.jupiter.api.Test; +import org.onap.dcaegen2.services.sdk.services.hvves.client.producer.api.HvVesProducer; +import org.onap.dcaegen2.services.sdk.services.hvves.client.producer.api.HvVesProducerFactory; +import org.reactivestreams.Publisher; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; +import reactor.test.StepVerifier.FirstStep; + +/** + * @author Piotr Jaszczyk + * @since January 2019 + */ +public class HvVesHvVesProducerIT { + + @Test + public void todo() { + final HvVesProducer cut = HvVesProducerFactory.getInstance().create(); + + final Publisher result = cut.send(Flux.just("hello", "world")); + + StepVerifier.create(result).verifyComplete(); + } +} diff --git a/services/hv-ves-client/producer/impl/pom.xml b/services/hv-ves-client/producer/impl/pom.xml new file mode 100644 index 00000000..7703fcd0 --- /dev/null +++ b/services/hv-ves-client/producer/impl/pom.xml @@ -0,0 +1,59 @@ + + + + 4.0.0 + + + org.onap.dcaegen2.services.sdk + hvvesclient-producer + 1.1.1-SNAPSHOT + .. + + + hvvesclient-producer-impl + 1.1.1-SNAPSHOT + + High Volume VES Collector Client :: Producer :: Implementation + + jar + + + + org.onap.dcaegen2.services.sdk + hvvesclient-producer-api + ${project.version} + + + io.projectreactor.netty + reactor-netty + + + org.slf4j + slf4j-api + + + ch.qos.logback + logback-classic + + + diff --git a/services/hv-ves-client/producer/impl/src/main/java/org/onap/dcaegen2/services/sdk/services/hvves/client/producer/impl/HvVesProducerFactoryImpl.java b/services/hv-ves-client/producer/impl/src/main/java/org/onap/dcaegen2/services/sdk/services/hvves/client/producer/impl/HvVesProducerFactoryImpl.java new file mode 100644 index 00000000..d0a5358e --- /dev/null +++ b/services/hv-ves-client/producer/impl/src/main/java/org/onap/dcaegen2/services/sdk/services/hvves/client/producer/impl/HvVesProducerFactoryImpl.java @@ -0,0 +1,35 @@ +/* + * ============LICENSE_START======================================================= + * DCAEGEN2-SERVICES-SDK + * ================================================================================ + * Copyright (C) 2019 Nokia. 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.onap.dcaegen2.services.sdk.services.hvves.client.producer.impl; + +import org.onap.dcaegen2.services.sdk.services.hvves.client.producer.api.HvVesProducer; +import org.onap.dcaegen2.services.sdk.services.hvves.client.producer.api.HvVesProducerFactory; + +/** + * @author Piotr Jaszczyk + * @since January 2019 + */ +public class HvVesProducerFactoryImpl implements HvVesProducerFactory { + + @Override + public HvVesProducer create() { + return new HvVesProducerImpl(); + } +} diff --git a/services/hv-ves-client/producer/impl/src/main/java/org/onap/dcaegen2/services/sdk/services/hvves/client/producer/impl/HvVesProducerImpl.java b/services/hv-ves-client/producer/impl/src/main/java/org/onap/dcaegen2/services/sdk/services/hvves/client/producer/impl/HvVesProducerImpl.java new file mode 100644 index 00000000..b9be56a7 --- /dev/null +++ b/services/hv-ves-client/producer/impl/src/main/java/org/onap/dcaegen2/services/sdk/services/hvves/client/producer/impl/HvVesProducerImpl.java @@ -0,0 +1,42 @@ +/* + * ============LICENSE_START======================================================= + * DCAEGEN2-SERVICES-SDK + * ================================================================================ + * Copyright (C) 2019 Nokia. 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.onap.dcaegen2.services.sdk.services.hvves.client.producer.impl; + +import org.onap.dcaegen2.services.sdk.services.hvves.client.producer.api.HvVesProducer; +import org.reactivestreams.Publisher; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * @author Piotr Jaszczyk + * @since January 2019 + */ +public class HvVesProducerImpl implements HvVesProducer { + private static final Logger logger = LoggerFactory.getLogger(HvVesProducerImpl.class); + + @Override + public Mono send(Publisher messages) { + return Flux.from(messages) + .doOnNext(msg -> logger.info("Dummy sending: {}", msg)) + .then(); + } +} diff --git a/services/hv-ves-client/producer/impl/src/main/resources/META-INF/services/org.onap.dcaegen2.services.sdk.services.hvves.client.producer.api.HvVesProducerFactory b/services/hv-ves-client/producer/impl/src/main/resources/META-INF/services/org.onap.dcaegen2.services.sdk.services.hvves.client.producer.api.HvVesProducerFactory new file mode 100644 index 00000000..d76ea2e7 --- /dev/null +++ b/services/hv-ves-client/producer/impl/src/main/resources/META-INF/services/org.onap.dcaegen2.services.sdk.services.hvves.client.producer.api.HvVesProducerFactory @@ -0,0 +1 @@ +org.onap.dcaegen2.services.sdk.services.hvves.client.producer.impl.HvVesProducerFactoryImpl \ No newline at end of file diff --git a/services/hv-ves-client/producer/pom.xml b/services/hv-ves-client/producer/pom.xml new file mode 100644 index 00000000..89020fdb --- /dev/null +++ b/services/hv-ves-client/producer/pom.xml @@ -0,0 +1,45 @@ + + + + 4.0.0 + + + org.onap.dcaegen2.services.sdk + dcaegen2-services-sdk-services-hvvesclient + 1.1.1-SNAPSHOT + .. + + + hvvesclient-producer + 1.1.1-SNAPSHOT + + High Volume VES Collector Client :: Producer + + pom + + + api + impl + ct + + diff --git a/services/pom.xml b/services/pom.xml new file mode 100644 index 00000000..d17da0da --- /dev/null +++ b/services/pom.xml @@ -0,0 +1,44 @@ + + + + 4.0.0 + + + org.onap.dcaegen2.services + sdk + 1.1.1-SNAPSHOT + .. + + + org.onap.dcaegen2.services.sdk + dcaegen2-services-sdk-services + 1.1.1-SNAPSHOT + + dcaegen2-services-sdk-services + + pom + + + hv-ves-client + + diff --git a/version.properties b/version.properties index 73415a7d..11ad59d0 100644 --- a/version.properties +++ b/version.properties @@ -1,6 +1,6 @@ major=1 minor=1 -patch=0 +patch=1 base_version=${major}.${minor}.${patch} release_version=${base_version} snapshot_version=${base_version}-SNAPSHOT