+/*-\r
+ * ============LICENSE_START=======================================================\r
+ * openECOMP : SDN-C\r
+ * ================================================================================\r
+ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights\r
+ * reserved.\r
+ * \r
+ * Modifications Copyright (C) 2019 IBM.\r
+ * ================================================================================\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ * ============LICENSE_END=========================================================\r
+ */\r
package org.onap.ccsdk.sli.adaptors.messagerouter.consumer.provider.impl;\r
\r
import java.io.UnsupportedEncodingException;\r
private Integer timeoutQueryParamValue;\r
private String filter;\r
protected String auth;\r
-\r
+ \r
+ public ConsumerFactory(Properties properties) {\r
+ // Required properties\r
+ username = properties.getProperty("username");\r
+ password = properties.getProperty("password");\r
+ host = properties.getProperty("host");\r
+ auth = properties.getProperty("auth");\r
+ group = properties.getProperty("group");\r
+ id = properties.getProperty("id");\r
+\r
+ // Optional properties\r
+ connectTimeout = readOptionalInteger(properties, "connectTimeoutSeconds");\r
+ readTimeout = readOptionalInteger(properties, "readTimeoutMinutes");\r
+ fetchPause = readOptionalInteger(properties, "fetchPause");\r
+ limit = readOptionalInteger(properties, "limit");\r
+ timeoutQueryParamValue = readOptionalInteger(properties, "timeout");\r
+ processFilter(properties.getProperty("filter"));\r
+\r
+ setDefaults();\r
+ }\r
+ \r
public String getAuth() {\r
return auth;\r
}\r
setDefaults();\r
}\r
\r
- public ConsumerFactory(Properties properties) {\r
- // Required properties\r
- username = properties.getProperty("username");\r
- password = properties.getProperty("password");\r
- host = properties.getProperty("host");\r
- auth = properties.getProperty("auth");\r
- group = properties.getProperty("group");\r
- id = properties.getProperty("id");\r
-\r
- // Optional properties\r
- connectTimeout = readOptionalInteger(properties, "connectTimeoutSeconds");\r
- readTimeout = readOptionalInteger(properties, "readTimeoutMinutes");\r
- fetchPause = readOptionalInteger(properties, "fetchPause");\r
- limit = readOptionalInteger(properties, "limit");\r
- timeoutQueryParamValue = readOptionalInteger(properties, "timeout");\r
- processFilter(properties.getProperty("filter"));\r
-\r
- setDefaults();\r
- }\r
-\r
private Integer readOptionalInteger(Properties properties, String propertyName) {\r
String stringValue = properties.getProperty(propertyName);\r
if (stringValue != null && stringValue.length() > 0) {\r