diff options
3 files changed, 69 insertions, 25 deletions
diff --git a/message-router/consumer/provider/src/main/java/org/onap/ccsdk/sli/adaptors/messagerouter/consumer/provider/impl/ConsumerFactory.java b/message-router/consumer/provider/src/main/java/org/onap/ccsdk/sli/adaptors/messagerouter/consumer/provider/impl/ConsumerFactory.java index 051380e1a..0802bec2f 100755 --- a/message-router/consumer/provider/src/main/java/org/onap/ccsdk/sli/adaptors/messagerouter/consumer/provider/impl/ConsumerFactory.java +++ b/message-router/consumer/provider/src/main/java/org/onap/ccsdk/sli/adaptors/messagerouter/consumer/provider/impl/ConsumerFactory.java @@ -1,3 +1,25 @@ +/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights
+ * reserved.
+ *
+ * Modifications Copyright (C) 2019 IBM.
+ * ================================================================================
+ * 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.ccsdk.sli.adaptors.messagerouter.consumer.provider.impl;
import java.io.UnsupportedEncodingException;
@@ -34,7 +56,27 @@ public class ConsumerFactory { private Integer timeoutQueryParamValue;
private String filter;
protected String auth;
-
+
+ public ConsumerFactory(Properties properties) {
+ // Required properties
+ username = properties.getProperty("username");
+ password = properties.getProperty("password");
+ host = properties.getProperty("host");
+ auth = properties.getProperty("auth");
+ group = properties.getProperty("group");
+ id = properties.getProperty("id");
+
+ // Optional properties
+ connectTimeout = readOptionalInteger(properties, "connectTimeoutSeconds");
+ readTimeout = readOptionalInteger(properties, "readTimeoutMinutes");
+ fetchPause = readOptionalInteger(properties, "fetchPause");
+ limit = readOptionalInteger(properties, "limit");
+ timeoutQueryParamValue = readOptionalInteger(properties, "timeout");
+ processFilter(properties.getProperty("filter"));
+
+ setDefaults();
+ }
+
public String getAuth() {
return auth;
}
@@ -100,26 +142,6 @@ public class ConsumerFactory { setDefaults();
}
- public ConsumerFactory(Properties properties) {
- // Required properties
- username = properties.getProperty("username");
- password = properties.getProperty("password");
- host = properties.getProperty("host");
- auth = properties.getProperty("auth");
- group = properties.getProperty("group");
- id = properties.getProperty("id");
-
- // Optional properties
- connectTimeout = readOptionalInteger(properties, "connectTimeoutSeconds");
- readTimeout = readOptionalInteger(properties, "readTimeoutMinutes");
- fetchPause = readOptionalInteger(properties, "fetchPause");
- limit = readOptionalInteger(properties, "limit");
- timeoutQueryParamValue = readOptionalInteger(properties, "timeout");
- processFilter(properties.getProperty("filter"));
-
- setDefaults();
- }
-
private Integer readOptionalInteger(Properties properties, String propertyName) {
String stringValue = properties.getProperty(propertyName);
if (stringValue != null && stringValue.length() > 0) {
diff --git a/message-router/consumer/provider/src/main/java/org/onap/ccsdk/sli/adaptors/messagerouter/consumer/provider/impl/PullingConsumerImpl.java b/message-router/consumer/provider/src/main/java/org/onap/ccsdk/sli/adaptors/messagerouter/consumer/provider/impl/PullingConsumerImpl.java index b3f0aef4e..e5a5bc4d8 100755 --- a/message-router/consumer/provider/src/main/java/org/onap/ccsdk/sli/adaptors/messagerouter/consumer/provider/impl/PullingConsumerImpl.java +++ b/message-router/consumer/provider/src/main/java/org/onap/ccsdk/sli/adaptors/messagerouter/consumer/provider/impl/PullingConsumerImpl.java @@ -1,7 +1,29 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights + * reserved. + * + * Modifications Copyright (C) 2019 IBM. + * ================================================================================ + * 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.ccsdk.sli.adaptors.messagerouter.consumer.provider.impl; import org.onap.ccsdk.sli.adaptors.messagerouter.consumer.api.PullingConsumer; -import org.onap.ccsdk.sli.adaptors.messagerouter.consumer.api.RequestHandler; + public class PullingConsumerImpl extends AbstractBaseConsumer implements PullingConsumer { diff --git a/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/ra/ResourceAllocator.java b/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/ra/ResourceAllocator.java index c51b03846..338c528a8 100644 --- a/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/ra/ResourceAllocator.java +++ b/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/ra/ResourceAllocator.java @@ -2,9 +2,9 @@ * ============LICENSE_START======================================================= * openECOMP : SDN-C * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights + * Copyright (C) 2019 AT&T Intellectual Property. All rights * reserved. - * Modifications Copyright (C) 2018 IBM. + * Modifications Copyright (C) 2019 IBM. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -273,7 +273,7 @@ public class ResourceAllocator implements SvcLogicResource { return release(sd, rr, null); } - public AllocationStatus release(ResourceEntity sd, ResourceRequest rr, ResourceTarget rt) throws Exception { + public AllocationStatus release(ResourceEntity sd, ResourceRequest rr, ResourceTarget rt) { ReleaseRequest releaseRequest = new ReleaseRequest(); |