aboutsummaryrefslogtreecommitdiffstats
path: root/rest-client/src/main/java/org/openo/baseservice/roa/util/restclient/HttpBaseRest.java
diff options
context:
space:
mode:
Diffstat (limited to 'rest-client/src/main/java/org/openo/baseservice/roa/util/restclient/HttpBaseRest.java')
-rw-r--r--rest-client/src/main/java/org/openo/baseservice/roa/util/restclient/HttpBaseRest.java28
1 files changed, 5 insertions, 23 deletions
diff --git a/rest-client/src/main/java/org/openo/baseservice/roa/util/restclient/HttpBaseRest.java b/rest-client/src/main/java/org/openo/baseservice/roa/util/restclient/HttpBaseRest.java
index 4f58778..3e64937 100644
--- a/rest-client/src/main/java/org/openo/baseservice/roa/util/restclient/HttpBaseRest.java
+++ b/rest-client/src/main/java/org/openo/baseservice/roa/util/restclient/HttpBaseRest.java
@@ -1,11 +1,11 @@
/*
- * Copyright (c) 2016, Huawei Technologies Co., Ltd.
+ * Copyright 2016 Huawei Technologies Co., Ltd.
*
* 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
+ * 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,
@@ -31,7 +31,6 @@ import org.eclipse.jetty.client.HttpClient;
import org.eclipse.jetty.client.HttpExchange;
import org.eclipse.jetty.http.HttpMethods;
import org.openo.baseservice.remoteservice.exception.ServiceException;
-import org.openo.baseservice.roa.util.ServiceUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -41,7 +40,7 @@ import org.slf4j.LoggerFactory;
* </p>
*
* @author
- * @version SDNO 0.5 Aug 9, 2016
+ * @version Aug 9, 2016
*/
public abstract class HttpBaseRest implements Restful {
@@ -68,7 +67,7 @@ public abstract class HttpBaseRest implements Restful {
* <p>
* </p>
*
- * @since SDNO 0.5
+ * @since
*/
public HttpBaseRest() {
super();
@@ -145,7 +144,7 @@ public abstract class HttpBaseRest implements Restful {
* @param callback
* @return
* @throws ServiceException
- * @since SDNO 0.5
+ * @since
*/
protected RestfulResponse sendHttpRequest(final String method, final String servicePath,
final RestfulParametes restParametes, final RestfulOptions options, final RestfulAsyncCallback callback)
@@ -193,23 +192,6 @@ public abstract class HttpBaseRest implements Restful {
} else {
String host = defaultIP;
int iPort = defaultPort;
- String calledServiceName = null;
- if(options != null) {
- calledServiceName = options.getCalledServicName();
- }
- final ServiceUtil serviceUtil = new ServiceUtil(calledServiceName, url.toString());
- final String configHost = serviceUtil.getServiceHost();
- final int configPort = serviceUtil.getServicePort();
- if(!configHost.isEmpty() && configPort > 0) {
- if(options != null) {
- options.setHost(configHost);
- options.setPort(configPort);
- } else {
- host = configHost;
-
- iPort = configPort;
- }
- }
if(options != null) {
host = options.getHost();
if(host.isEmpty()) {