2 * Copyright 2016 Huawei Technologies Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.common;
19 import java.util.Locale;
20 import java.util.ResourceBundle;
22 import org.slf4j.Logger;
23 import org.slf4j.LoggerFactory;
26 * Provide function for reading register parameter.
32 * @version NFVO 0.5 Aug 25, 2016
34 public class RegisterConfigInfo {
36 private static final Logger LOGGER = LoggerFactory.getLogger(RegisterConfigInfo.class);
38 private String serviceName;
40 private String version;
44 private String protocol;
52 private static RegisterConfigInfo regConfig = new RegisterConfigInfo();
54 private RegisterConfigInfo() {
55 ResourceBundle rb = ResourceBundle.getBundle("registerService", Locale.getDefault());
56 serviceName = rb.getString("serviceName");
57 version = rb.getString("version");
58 url = rb.getString("url");
59 protocol = rb.getString("protocol");
60 ip = rb.getString("ip");
61 port = rb.getString("port");
62 ttl = rb.getString("ttl");
65 public static RegisterConfigInfo getInstance() {
69 public String getServiceName() {
73 public String getVersion() {
77 public String getUrl() {
81 public String getProtocol() {
85 public String getIp() {
89 public String getPort() {
93 public String getTtl() {