brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [8/9] incubator-brooklyn git commit: Further updates in response to additional comments on pull request.
Date Wed, 04 Nov 2015 15:47:53 GMT
Further updates in response to additional comments on pull request.

Added TrustingSslSocketFactory to deserializingClassRenames.properties (https://github.com/apache/incubator-brooklyn/pull/994#commitcomment-14139640)

Added back an HttpTool and HttpToolResponse in the old location, with @Deprecated markers,
for backward compatibility (https://github.com/apache/incubator-brooklyn/pull/994#issuecomment-153171583)

Added "since 0.9.0" to classes I have deprecated (https://github.com/apache/incubator-brooklyn/pull/994#discussion_r43803617)


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/c4662406
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/c4662406
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/c4662406

Branch: refs/heads/master
Commit: c46624060c72aacd50b640d7744af93f791efce8
Parents: 019666c
Author: Geoff Macartney <geoff.macartney@cloudsoftcorp.com>
Authored: Tue Nov 3 21:02:13 2015 +0000
Committer: Geoff Macartney <geoff.macartney@cloudsoftcorp.com>
Committed: Tue Nov 3 21:02:13 2015 +0000

----------------------------------------------------------------------
 .../brooklyn/util/core/http/HttpTool.java       | 85 ++++++++++++++++++++
 .../util/core/http/HttpToolResponse.java        | 35 ++++++++
 .../deserializingClassRenames.properties        |  4 +-
 .../apache/brooklyn/test/EntityTestUtils.java   |  2 +-
 .../org/apache/brooklyn/test/HttpTestUtils.java |  2 +-
 .../org/apache/brooklyn/util/http/HttpTool.java |  3 +
 .../brooklyn/util/http/HttpToolResponse.java    |  3 +
 7 files changed, 131 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/c4662406/core/src/main/java/org/apache/brooklyn/util/core/http/HttpTool.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/util/core/http/HttpTool.java b/core/src/main/java/org/apache/brooklyn/util/core/http/HttpTool.java
new file mode 100644
index 0000000..f2ed019
--- /dev/null
+++ b/core/src/main/java/org/apache/brooklyn/util/core/http/HttpTool.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.brooklyn.util.core.http;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+import static com.google.common.base.Preconditions.checkState;
+
+import java.net.URI;
+import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.apache.brooklyn.util.crypto.SslTrustUtils;
+import org.apache.brooklyn.util.exceptions.Exceptions;
+import org.apache.brooklyn.util.net.URLParamEncoder;
+import org.apache.brooklyn.util.text.Strings;
+import org.apache.brooklyn.util.time.Duration;
+import org.apache.commons.codec.binary.Base64;
+import org.apache.http.ConnectionReuseStrategy;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpRequest;
+import org.apache.http.HttpResponse;
+import org.apache.http.NameValuePair;
+import org.apache.http.auth.AuthScope;
+import org.apache.http.auth.Credentials;
+import org.apache.http.auth.UsernamePasswordCredentials;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.entity.UrlEncodedFormEntity;
+import org.apache.http.client.methods.HttpDelete;
+import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpHead;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.methods.HttpPut;
+import org.apache.http.client.methods.HttpUriRequest;
+import org.apache.http.conn.ClientConnectionManager;
+import org.apache.http.conn.scheme.Scheme;
+import org.apache.http.conn.scheme.SchemeSocketFactory;
+import org.apache.http.conn.ssl.SSLSocketFactory;
+import org.apache.http.conn.ssl.TrustSelfSignedStrategy;
+import org.apache.http.conn.ssl.TrustStrategy;
+import org.apache.http.conn.ssl.X509HostnameVerifier;
+import org.apache.http.entity.ByteArrayEntity;
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.http.impl.client.LaxRedirectStrategy;
+import org.apache.http.message.BasicNameValuePair;
+import org.apache.http.params.BasicHttpParams;
+import org.apache.http.params.HttpConnectionParams;
+import org.apache.http.params.HttpParams;
+import org.apache.http.util.EntityUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.base.Function;
+import com.google.common.base.Joiner;
+import com.google.common.base.Optional;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Multimap;
+
+/**
+ * @deprecated since 0.9.0. Prefer org.apache.brooklyn.util.http.HttpTool
+ */
+@Deprecated
+public class HttpTool extends org.apache.brooklyn.util.http.HttpTool {
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/c4662406/core/src/main/java/org/apache/brooklyn/util/core/http/HttpToolResponse.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/util/core/http/HttpToolResponse.java b/core/src/main/java/org/apache/brooklyn/util/core/http/HttpToolResponse.java
new file mode 100644
index 0000000..2b3f73f
--- /dev/null
+++ b/core/src/main/java/org/apache/brooklyn/util/core/http/HttpToolResponse.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.brooklyn.util.core.http;
+
+
+import org.apache.brooklyn.feed.http.HttpPollValue;
+import org.apache.http.HttpResponse;
+
+/**
+ * @deprecated since 0.9.0 Prefer org.apache.brooklyn.util.http.HttpToolResponse
+ */
+@Deprecated
+public class HttpToolResponse extends org.apache.brooklyn.util.http.HttpToolResponse
+    implements HttpPollValue {
+
+    public HttpToolResponse(HttpResponse response, long startTime) {
+        super(response, startTime);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/c4662406/core/src/main/resources/org/apache/brooklyn/core/mgmt/persist/deserializingClassRenames.properties
----------------------------------------------------------------------
diff --git a/core/src/main/resources/org/apache/brooklyn/core/mgmt/persist/deserializingClassRenames.properties
b/core/src/main/resources/org/apache/brooklyn/core/mgmt/persist/deserializingClassRenames.properties
index 2503425..a5801c9 100644
--- a/core/src/main/resources/org/apache/brooklyn/core/mgmt/persist/deserializingClassRenames.properties
+++ b/core/src/main/resources/org/apache/brooklyn/core/mgmt/persist/deserializingClassRenames.properties
@@ -1418,4 +1418,6 @@ brooklyn.entity.nosql.redis.RedisClusterImpl
 brooklyn.test.TrustingSslSocketFactory                                           : org.apache.brooklyn.util.http.TrustingSslSocketFactory
 brooklyn.util.crypto.TrustingSslSocketFactory                                    : org.apache.brooklyn.util.crypto.TrustingSslSocketFactory
 
-org.apache.brooklyn.test.TrustingSslSocketFactory                                : org.apache.brooklyn.util.http.TrustingSslSocketFactory
\ No newline at end of file
+org.apache.brooklyn.test.TrustingSslSocketFactory                                : org.apache.brooklyn.util.http.TrustingSslSocketFactory
+org.apache.brooklyn.util.core.http.HttpTool                                      : org.apache.brooklyn.util.http.HttpTool
+org.apache.brooklyn.util.core.http.HttpToolResponse                              : org.apache.brooklyn.util.http.HttpToolResponse

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/c4662406/usage/test-support/src/main/java/org/apache/brooklyn/test/EntityTestUtils.java
----------------------------------------------------------------------
diff --git a/usage/test-support/src/main/java/org/apache/brooklyn/test/EntityTestUtils.java
b/usage/test-support/src/main/java/org/apache/brooklyn/test/EntityTestUtils.java
index 5b1e22b..71c2f64 100644
--- a/usage/test-support/src/main/java/org/apache/brooklyn/test/EntityTestUtils.java
+++ b/usage/test-support/src/main/java/org/apache/brooklyn/test/EntityTestUtils.java
@@ -48,7 +48,7 @@ import com.google.common.collect.Sets;
 /**
  * A utility class containing tests on Entities.
  *
- * @deprecated Prefer core assertions class org.apache.brooklyn.core.entity.EntityAsserts.
+ * @deprecated since 0.9.0. Prefer core assertions class org.apache.brooklyn.core.entity.EntityAsserts.
  */
 @Deprecated
 public class EntityTestUtils {

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/c4662406/usage/test-support/src/main/java/org/apache/brooklyn/test/HttpTestUtils.java
----------------------------------------------------------------------
diff --git a/usage/test-support/src/main/java/org/apache/brooklyn/test/HttpTestUtils.java
b/usage/test-support/src/main/java/org/apache/brooklyn/test/HttpTestUtils.java
index 869cb1e..91a1f0e 100644
--- a/usage/test-support/src/main/java/org/apache/brooklyn/test/HttpTestUtils.java
+++ b/usage/test-support/src/main/java/org/apache/brooklyn/test/HttpTestUtils.java
@@ -59,7 +59,7 @@ import com.google.common.util.concurrent.ListeningExecutorService;
  * 
  * @author aled
  *
- * @deprecated Prefer org.apache.brooklyn.util.http.HttpAsserts which has no TestNG dependencies.
+ * @deprecated since 0.9.0. Prefer org.apache.brooklyn.util.http.HttpAsserts which has no
TestNG dependencies.
  */
 @Deprecated
 public class HttpTestUtils {

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/c4662406/utils/common/src/main/java/org/apache/brooklyn/util/http/HttpTool.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/http/HttpTool.java b/utils/common/src/main/java/org/apache/brooklyn/util/http/HttpTool.java
index 8811a32..b9167c7 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/util/http/HttpTool.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/util/http/HttpTool.java
@@ -89,6 +89,9 @@ import javax.net.ssl.HostnameVerifier;
 import javax.net.ssl.HttpsURLConnection;
 import javax.net.ssl.SSLSession;
 
+/**
+ * A utility tool for HTTP operations.
+ */
 public class HttpTool {
 
     private static final Logger LOG = LoggerFactory.getLogger(HttpTool.class);

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/c4662406/utils/common/src/main/java/org/apache/brooklyn/util/http/HttpToolResponse.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/http/HttpToolResponse.java
b/utils/common/src/main/java/org/apache/brooklyn/util/http/HttpToolResponse.java
index 70bcb17..811b3e1 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/util/http/HttpToolResponse.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/util/http/HttpToolResponse.java
@@ -42,6 +42,9 @@ import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Maps;
 import com.google.common.io.ByteStreams;
 
+/**
+ * A response class for use with {@link HttpTool}.
+ */
 public class HttpToolResponse {
 
     private static final Logger log = LoggerFactory.getLogger(HttpToolResponse.class);


Mime
View raw message