camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aki Yoshida <elak...@gmail.com>
Subject Re: camel git commit: [CAMEL-8333]Upgrade async-http-client to 1.9.0
Date Wed, 11 Feb 2015 10:15:49 GMT
i think someone has fixed it already ;-)

2015-02-11 11:05 GMT+01:00 Aki Yoshida <elakito@gmail.com>:
> i can look into it.
>
>
> 2015-02-11 8:16 GMT+01:00 Claus Ibsen <claus.ibsen@gmail.com>:
>> Hi
>>
>> I think this causes camel-ahc-ws to not compile anymore.
>>
>> [ERROR] /Users/davsclaus/workspace/camel/components/camel-ahc-ws/src/main/java/org/apache/camel/component/ahc/ws/WsEndpoint.java:[215,8]
>> error: method does not override or implement a method from a supertype
>>
>> On Wed, Feb 11, 2015 at 7:43 AM,  <ffang@apache.org> wrote:
>>> Repository: camel
>>> Updated Branches:
>>>   refs/heads/master c7cb9d3f0 -> 5b4ac7886
>>>
>>>
>>> [CAMEL-8333]Upgrade async-http-client to 1.9.0
>>>
>>>
>>> Project: http://git-wip-us.apache.org/repos/asf/camel/repo
>>> Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/5b4ac788
>>> Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5b4ac788
>>> Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5b4ac788
>>>
>>> Branch: refs/heads/master
>>> Commit: 5b4ac788603fdf4003ddf8c40182df752b13b0bb
>>> Parents: c7cb9d3
>>> Author: Freeman Fang <freeman.fang@gmail.com>
>>> Authored: Wed Feb 11 14:42:39 2015 +0800
>>> Committer: Freeman Fang <freeman.fang@gmail.com>
>>> Committed: Wed Feb 11 14:42:39 2015 +0800
>>>
>>> ----------------------------------------------------------------------
>>>  .../ahc/AhcComponentClientConfigTest.java       |  2 +-
>>>  ...ConfigWithClientConfigUriParametersTest.java |  6 ++--
>>>  .../ahc/AhcComponentCustomClientConfigTest.java |  2 +-
>>>  .../ahc/AhcComponentNettyClientConfigTest.java  |  4 +--
>>>  .../ahc/AhcProduceClientConfigTest.java         |  2 +-
>>>  ...ConfigWithClientConfigUriParametersTest.java |  6 ++--
>>>  ...roduceWithClientConfigUriParametersTest.java |  2 +-
>>>  .../atmosphere/websocket/TestClient.java        | 21 +++++--------
>>>  .../websocket/AllowAllHostnameVerifier.java     | 32 ++++++++++++++++++++
>>>  .../WebsocketClientCamelRouteTest.java          | 13 +++-----
>>>  .../WebsocketComponentRouteExampleTest.java     | 13 +++-----
>>>  .../websocket/WebsocketConsumerRouteTest.java   |  8 ++---
>>>  .../WebsocketProducerRouteExampleTest.java      | 18 ++++-------
>>>  .../websocket/WebsocketRouteExampleTest.java    | 12 +++-----
>>>  ...ebsocketSSLContextInUriRouteExampleTest.java | 13 ++++----
>>>  .../websocket/WebsocketSSLRouteExampleTest.java | 14 ++++-----
>>>  .../WebsocketTwoRoutesExampleTest.java          | 19 ++++--------
>>>  parent/pom.xml                                  |  2 +-
>>>  18 files changed, 94 insertions(+), 95 deletions(-)
>>> ----------------------------------------------------------------------
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/camel/blob/5b4ac788/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigTest.java
>>> ----------------------------------------------------------------------
>>> diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigTest.java
b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigTest.java
>>> index c03d9fe..fe77d05 100644
>>> --- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigTest.java
>>> +++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigTest.java
>>> @@ -30,7 +30,7 @@ public class AhcComponentClientConfigTest extends BaseAhcTest
{
>>>          AsyncHttpClientConfig.Builder builder = new AsyncHttpClientConfig.Builder();
>>>          // use the builder to set the options we want, in this case we want
to follow redirects and try
>>>          // at most 3 retries to send a request to the host
>>> -        AsyncHttpClientConfig config = builder.setFollowRedirects(true).setMaxRequestRetry(3).build();
>>> +        AsyncHttpClientConfig config = builder.setFollowRedirect(true).setMaxRequestRetry(3).build();
>>>
>>>          // lookup AhcComponent
>>>          AhcComponent component = context.getComponent("ahc", AhcComponent.class);
>>>
>>> http://git-wip-us.apache.org/repos/asf/camel/blob/5b4ac788/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigWithClientConfigUriParametersTest.java
>>> ----------------------------------------------------------------------
>>> diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigWithClientConfigUriParametersTest.java
b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigWithClientConfigUriParametersTest.java
>>> index 46d5020..83c3445 100644
>>> --- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigWithClientConfigUriParametersTest.java
>>> +++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigWithClientConfigUriParametersTest.java
>>> @@ -28,13 +28,13 @@ public class AhcComponentClientConfigWithClientConfigUriParametersTest
extends A
>>>          Endpoint ahcEndpoint = context.getEndpoint(getAhcEndpointUri());
>>>          assertTrue(ahcEndpoint instanceof AhcEndpoint);
>>>
>>> -        assertEquals(1, ((AhcEndpoint) ahcEndpoint).getClientConfig().getMaxTotalConnections());
>>> +        assertEquals(1, ((AhcEndpoint) ahcEndpoint).getClientConfig().getMaxConnections());
>>>          assertEquals(3, ((AhcEndpoint) ahcEndpoint).getClientConfig().getMaxRequestRetry());
>>> -        assertEquals(true, ((AhcEndpoint) ahcEndpoint).getClientConfig().isRedirectEnabled());
>>> +        assertEquals(true, ((AhcEndpoint) ahcEndpoint).getClientConfig().isFollowRedirect());
>>>      }
>>>
>>>      @Override
>>>      protected String getAhcEndpointUri() {
>>> -        return super.getAhcEndpointUri() + "?clientConfig.maximumConnectionsTotal=1";
>>> +        return super.getAhcEndpointUri() + "?clientConfig.maxConnections=1";
>>>      }
>>>  }
>>>
>>> http://git-wip-us.apache.org/repos/asf/camel/blob/5b4ac788/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentCustomClientConfigTest.java
>>> ----------------------------------------------------------------------
>>> diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentCustomClientConfigTest.java
b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentCustomClientConfigTest.java
>>> index 35f33dd..95b7be5 100644
>>> --- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentCustomClientConfigTest.java
>>> +++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentCustomClientConfigTest.java
>>> @@ -30,7 +30,7 @@ public class AhcComponentCustomClientConfigTest extends BaseAhcTest
{
>>>          CamelContext context = super.createCamelContext();
>>>
>>>          AsyncHttpClientConfig.Builder builder = new AsyncHttpClientConfig.Builder();
>>> -        AsyncHttpClientConfig config = builder.setFollowRedirects(true).setMaxRequestRetry(3).build();
>>> +        AsyncHttpClientConfig config = builder.setFollowRedirect(true).setMaxRequestRetry(3).build();
>>>
>>>          AhcComponent ahc = context.getComponent("ahc", AhcComponent.class);
>>>          ahc.setClientConfig(config);
>>>
>>> http://git-wip-us.apache.org/repos/asf/camel/blob/5b4ac788/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentNettyClientConfigTest.java
>>> ----------------------------------------------------------------------
>>> diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentNettyClientConfigTest.java
b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentNettyClientConfigTest.java
>>> index 6ffed20..a87ed47 100644
>>> --- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentNettyClientConfigTest.java
>>> +++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentNettyClientConfigTest.java
>>> @@ -32,11 +32,11 @@ public class AhcComponentNettyClientConfigTest extends BaseAhcTest
{
>>>
>>>          // use netty provider to reuse address
>>>          NettyAsyncHttpProviderConfig provider = new NettyAsyncHttpProviderConfig();
>>> -        provider.addProperty(NettyAsyncHttpProviderConfig.REUSE_ADDRESS, Boolean.TRUE);
>>> +        provider.addProperty("reuseAddress", Boolean.TRUE);
>>>
>>>          AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder()
>>>                  .setAsyncHttpClientProviderConfig(provider)
>>> -                .setFollowRedirects(true)
>>> +                .setFollowRedirect(true)
>>>                  .setMaxRequestRetry(3)
>>>                  .build();
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/camel/blob/5b4ac788/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceClientConfigTest.java
>>> ----------------------------------------------------------------------
>>> diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceClientConfigTest.java
b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceClientConfigTest.java
>>> index 4a7f14b..5a768be 100644
>>> --- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceClientConfigTest.java
>>> +++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceClientConfigTest.java
>>> @@ -28,7 +28,7 @@ public class AhcProduceClientConfigTest extends BaseAhcTest
{
>>>      @Override
>>>      protected JndiRegistry createRegistry() throws Exception {
>>>          AsyncHttpClientConfig.Builder builder = new AsyncHttpClientConfig.Builder();
>>> -        AsyncHttpClientConfig config = builder.setFollowRedirects(true).setMaxRequestRetry(3).build();
>>> +        AsyncHttpClientConfig config = builder.setFollowRedirect(true).setMaxRequestRetry(3).build();
>>>
>>>          JndiRegistry jndi = super.createRegistry();
>>>          jndi.bind("myConfig", config);
>>>
>>> http://git-wip-us.apache.org/repos/asf/camel/blob/5b4ac788/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceClientConfigWithClientConfigUriParametersTest.java
>>> ----------------------------------------------------------------------
>>> diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceClientConfigWithClientConfigUriParametersTest.java
b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceClientConfigWithClientConfigUriParametersTest.java
>>> index 5390597..6ac6012 100644
>>> --- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceClientConfigWithClientConfigUriParametersTest.java
>>> +++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceClientConfigWithClientConfigUriParametersTest.java
>>> @@ -28,13 +28,13 @@ public class AhcProduceClientConfigWithClientConfigUriParametersTest
extends Ahc
>>>          Endpoint ahcEndpoint = context.getEndpoint(getAhcEndpointUri());
>>>          assertTrue(ahcEndpoint instanceof AhcEndpoint);
>>>
>>> -        assertEquals(1, ((AhcEndpoint) ahcEndpoint).getClientConfig().getMaxTotalConnections());
>>> +        assertEquals(1, ((AhcEndpoint) ahcEndpoint).getClientConfig().getMaxConnections());
>>>          assertEquals(3, ((AhcEndpoint) ahcEndpoint).getClientConfig().getMaxRequestRetry());
>>> -        assertEquals(true, ((AhcEndpoint) ahcEndpoint).getClientConfig().isRedirectEnabled());
>>> +        assertEquals(true, ((AhcEndpoint) ahcEndpoint).getClientConfig().isFollowRedirect());
>>>      }
>>>
>>>      @Override
>>>      protected String getAhcEndpointUri() {
>>> -        return super.getAhcEndpointUri() + "&clientConfig.maximumConnectionsTotal=1";
>>> +        return super.getAhcEndpointUri() + "&clientConfig.maxConnections=1";
>>>      }
>>>  }
>>>
>>> http://git-wip-us.apache.org/repos/asf/camel/blob/5b4ac788/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceWithClientConfigUriParametersTest.java
>>> ----------------------------------------------------------------------
>>> diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceWithClientConfigUriParametersTest.java
b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceWithClientConfigUriParametersTest.java
>>> index 3c4f90c..f8965a8 100644
>>> --- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceWithClientConfigUriParametersTest.java
>>> +++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceWithClientConfigUriParametersTest.java
>>> @@ -33,7 +33,7 @@ public class AhcProduceWithClientConfigUriParametersTest extends
BaseAhcTest {
>>>
>>>      @Override
>>>      protected String getAhcEndpointUri() {
>>> -        return super.getAhcEndpointUri() + "?clientConfig.maxRequestRetry=3&clientConfig.followRedirects=true";
>>> +        return super.getAhcEndpointUri() + "?clientConfig.maxRequestRetry=3&clientConfig.followRedirect=true";
>>>      }
>>>
>>>      @Override
>>>
>>> http://git-wip-us.apache.org/repos/asf/camel/blob/5b4ac788/components/camel-atmosphere-websocket/src/test/java/org/apache/camel/component/atmosphere/websocket/TestClient.java
>>> ----------------------------------------------------------------------
>>> diff --git a/components/camel-atmosphere-websocket/src/test/java/org/apache/camel/component/atmosphere/websocket/TestClient.java
b/components/camel-atmosphere-websocket/src/test/java/org/apache/camel/component/atmosphere/websocket/TestClient.java
>>> index 32bccb9..ae9df8b 100644
>>> --- a/components/camel-atmosphere-websocket/src/test/java/org/apache/camel/component/atmosphere/websocket/TestClient.java
>>> +++ b/components/camel-atmosphere-websocket/src/test/java/org/apache/camel/component/atmosphere/websocket/TestClient.java
>>> @@ -25,10 +25,10 @@ import java.util.concurrent.TimeUnit;
>>>
>>>  import com.ning.http.client.AsyncHttpClient;
>>>  import com.ning.http.client.AsyncHttpClientConfig;
>>> -import com.ning.http.client.websocket.WebSocket;
>>> -import com.ning.http.client.websocket.WebSocketByteListener;
>>> -import com.ning.http.client.websocket.WebSocketTextListener;
>>> -import com.ning.http.client.websocket.WebSocketUpgradeHandler;
>>> +import com.ning.http.client.ws.WebSocket;
>>> +import com.ning.http.client.ws.WebSocketByteListener;
>>> +import com.ning.http.client.ws.WebSocketTextListener;
>>> +import com.ning.http.client.ws.WebSocketUpgradeHandler;
>>>
>>>
>>>  import org.slf4j.Logger;
>>> @@ -69,7 +69,7 @@ public class TestClient {
>>>      }
>>>
>>>      public void sendTextMessage(String message) {
>>> -        websocket.sendTextMessage(message);
>>> +        websocket.sendMessage(message);
>>>      }
>>>
>>>      public void sendBytesMessage(byte[] message) {
>>> @@ -144,11 +144,7 @@ public class TestClient {
>>>              latch.countDown();
>>>          }
>>>
>>> -        @Override
>>> -        public void onFragment(byte[] fragment, boolean last) {
>>> -            // TODO Auto-generated method stub
>>> -        }
>>> -
>>> +
>>>          @Override
>>>          public void onMessage(String message) {
>>>              received.add(message);
>>> @@ -156,10 +152,7 @@ public class TestClient {
>>>              latch.countDown();
>>>          }
>>>
>>> -        @Override
>>> -        public void onFragment(String fragment, boolean last) {
>>> -            // TODO Auto-generated method stub
>>> -        }
>>> +
>>>
>>>      }
>>>  }
>>>
>>> http://git-wip-us.apache.org/repos/asf/camel/blob/5b4ac788/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/AllowAllHostnameVerifier.java
>>> ----------------------------------------------------------------------
>>> diff --git a/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/AllowAllHostnameVerifier.java
b/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/AllowAllHostnameVerifier.java
>>> new file mode 100644
>>> index 0000000..bb53b92
>>> --- /dev/null
>>> +++ b/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/AllowAllHostnameVerifier.java
>>> @@ -0,0 +1,32 @@
>>> +/**
>>> + * 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.camel.component.websocket;
>>> +
>>> +import javax.net.ssl.HostnameVerifier;
>>> +import javax.net.ssl.SSLSession;
>>> +
>>> +/*
>>> + * Since async-http-client 1.9.0, by default it will use
>>> + * DefaultHostnameVerifier which strictly check if the hostname match (the CN
part in cert)
>>> + * Add this class to ensure the SSL enabled test can pass on any machine
>>> + */
>>> +public class AllowAllHostnameVerifier implements HostnameVerifier {
>>> +    public boolean verify(String s, SSLSession sslSession) {
>>> +        return true;
>>> +    }
>>> +}
>>>
>>> http://git-wip-us.apache.org/repos/asf/camel/blob/5b4ac788/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketClientCamelRouteTest.java
>>> ----------------------------------------------------------------------
>>> diff --git a/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketClientCamelRouteTest.java
b/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketClientCamelRouteTest.java
>>> index 2f860d8..ca44a40 100644
>>> --- a/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketClientCamelRouteTest.java
>>> +++ b/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketClientCamelRouteTest.java
>>> @@ -22,9 +22,9 @@ import java.util.concurrent.CountDownLatch;
>>>  import java.util.concurrent.TimeUnit;
>>>
>>>  import com.ning.http.client.AsyncHttpClient;
>>> -import com.ning.http.client.websocket.WebSocket;
>>> -import com.ning.http.client.websocket.WebSocketTextListener;
>>> -import com.ning.http.client.websocket.WebSocketUpgradeHandler;
>>> +import com.ning.http.client.ws.WebSocket;
>>> +import com.ning.http.client.ws.WebSocketTextListener;
>>> +import com.ning.http.client.ws.WebSocketUpgradeHandler;
>>>  import org.apache.camel.builder.RouteBuilder;
>>>  import org.apache.camel.test.AvailablePortFinder;
>>>  import org.apache.camel.test.junit4.CamelTestSupport;
>>> @@ -59,10 +59,7 @@ public class WebsocketClientCamelRouteTest extends CamelTestSupport
{
>>>                          latch.countDown();
>>>                      }
>>>
>>> -                    @Override
>>> -                    public void onFragment(String fragment, boolean last) {
>>> -                    }
>>> -
>>> +
>>>                      @Override
>>>                      public void onOpen(WebSocket websocket) {
>>>                      }
>>> @@ -79,7 +76,7 @@ public class WebsocketClientCamelRouteTest extends CamelTestSupport
{
>>>
>>>          getMockEndpoint("mock:client").expectedBodiesReceived("Hello from WS
client");
>>>
>>> -        websocket.sendTextMessage("Hello from WS client");
>>> +        websocket.sendMessage("Hello from WS client");
>>>          assertTrue(latch.await(10, TimeUnit.SECONDS));
>>>
>>>          assertMockEndpointsSatisfied();
>>>
>>> http://git-wip-us.apache.org/repos/asf/camel/blob/5b4ac788/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketComponentRouteExampleTest.java
>>> ----------------------------------------------------------------------
>>> diff --git a/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketComponentRouteExampleTest.java
b/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketComponentRouteExampleTest.java
>>> index 3f5e18d0..254e016 100644
>>> --- a/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketComponentRouteExampleTest.java
>>> +++ b/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketComponentRouteExampleTest.java
>>> @@ -22,9 +22,9 @@ import java.util.concurrent.CountDownLatch;
>>>  import java.util.concurrent.TimeUnit;
>>>
>>>  import com.ning.http.client.AsyncHttpClient;
>>> -import com.ning.http.client.websocket.WebSocket;
>>> -import com.ning.http.client.websocket.WebSocketTextListener;
>>> -import com.ning.http.client.websocket.WebSocketUpgradeHandler;
>>> +import com.ning.http.client.ws.WebSocket;
>>> +import com.ning.http.client.ws.WebSocketTextListener;
>>> +import com.ning.http.client.ws.WebSocketUpgradeHandler;
>>>  import org.apache.camel.builder.RouteBuilder;
>>>  import org.apache.camel.test.AvailablePortFinder;
>>>  import org.apache.camel.test.junit4.CamelTestSupport;
>>> @@ -59,10 +59,7 @@ public class WebsocketComponentRouteExampleTest extends CamelTestSupport
{
>>>                          latch.countDown();
>>>                      }
>>>
>>> -                    @Override
>>> -                    public void onFragment(String fragment, boolean last) {
>>> -                    }
>>> -
>>> +
>>>                      @Override
>>>                      public void onOpen(WebSocket websocket) {
>>>                      }
>>> @@ -77,7 +74,7 @@ public class WebsocketComponentRouteExampleTest extends CamelTestSupport
{
>>>                      }
>>>                  }).build()).get();
>>>
>>> -        websocket.sendTextMessage("Beer");
>>> +        websocket.sendMessage("Beer");
>>>          assertTrue(latch.await(10, TimeUnit.SECONDS));
>>>
>>>          assertEquals(1, received.size());
>>>
>>> http://git-wip-us.apache.org/repos/asf/camel/blob/5b4ac788/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketConsumerRouteTest.java
>>> ----------------------------------------------------------------------
>>> diff --git a/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketConsumerRouteTest.java
b/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketConsumerRouteTest.java
>>> index 6422964..3f76c00 100644
>>> --- a/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketConsumerRouteTest.java
>>> +++ b/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketConsumerRouteTest.java
>>> @@ -17,9 +17,9 @@
>>>  package org.apache.camel.component.websocket;
>>>
>>>  import com.ning.http.client.AsyncHttpClient;
>>> -import com.ning.http.client.websocket.WebSocket;
>>> -import com.ning.http.client.websocket.WebSocketListener;
>>> -import com.ning.http.client.websocket.WebSocketUpgradeHandler;
>>> +import com.ning.http.client.ws.WebSocket;
>>> +import com.ning.http.client.ws.WebSocketListener;
>>> +import com.ning.http.client.ws.WebSocketUpgradeHandler;
>>>  import org.apache.camel.builder.RouteBuilder;
>>>  import org.apache.camel.component.mock.MockEndpoint;
>>>  import org.apache.camel.test.AvailablePortFinder;
>>> @@ -62,7 +62,7 @@ public class WebsocketConsumerRouteTest extends CamelTestSupport
{
>>>          MockEndpoint result = getMockEndpoint("mock:result");
>>>          result.expectedBodiesReceived("Test");
>>>
>>> -        websocket.sendTextMessage("Test");
>>> +        websocket.sendMessage("Test");
>>>
>>>          result.assertIsSatisfied();
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/camel/blob/5b4ac788/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketProducerRouteExampleTest.java
>>> ----------------------------------------------------------------------
>>> diff --git a/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketProducerRouteExampleTest.java
b/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketProducerRouteExampleTest.java
>>> index bd5e9ba..0789c2e 100644
>>> --- a/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketProducerRouteExampleTest.java
>>> +++ b/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketProducerRouteExampleTest.java
>>> @@ -22,10 +22,10 @@ import java.util.concurrent.CountDownLatch;
>>>  import java.util.concurrent.TimeUnit;
>>>
>>>  import com.ning.http.client.AsyncHttpClient;
>>> -import com.ning.http.client.websocket.WebSocket;
>>> -import com.ning.http.client.websocket.WebSocketByteListener;
>>> -import com.ning.http.client.websocket.WebSocketTextListener;
>>> -import com.ning.http.client.websocket.WebSocketUpgradeHandler;
>>> +import com.ning.http.client.ws.WebSocket;
>>> +import com.ning.http.client.ws.WebSocketByteListener;
>>> +import com.ning.http.client.ws.WebSocketTextListener;
>>> +import com.ning.http.client.ws.WebSocketUpgradeHandler;
>>>  import org.apache.camel.Produce;
>>>  import org.apache.camel.ProducerTemplate;
>>>  import org.apache.camel.builder.RouteBuilder;
>>> @@ -66,10 +66,7 @@ public class WebsocketProducerRouteExampleTest extends CamelTestSupport
{
>>>                          latch.countDown();
>>>                      }
>>>
>>> -                    @Override
>>> -                    public void onFragment(String fragment, boolean last) {
>>> -                    }
>>> -
>>> +
>>>                      @Override
>>>                      public void onOpen(WebSocket websocket) {
>>>                      }
>>> @@ -113,10 +110,7 @@ public class WebsocketProducerRouteExampleTest extends CamelTestSupport
{
>>>                          latch.countDown();
>>>                      }
>>>
>>> -                    @Override
>>> -                    public void onFragment(byte[] fragment, boolean last) {
>>> -                    }
>>> -
>>> +
>>>                      @Override
>>>                      public void onOpen(WebSocket websocket) {
>>>                      }
>>>
>>> http://git-wip-us.apache.org/repos/asf/camel/blob/5b4ac788/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketRouteExampleTest.java
>>> ----------------------------------------------------------------------
>>> diff --git a/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketRouteExampleTest.java
b/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketRouteExampleTest.java
>>> index a15173b..52989c2 100644
>>> --- a/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketRouteExampleTest.java
>>> +++ b/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketRouteExampleTest.java
>>> @@ -22,9 +22,9 @@ import java.util.concurrent.CountDownLatch;
>>>  import java.util.concurrent.TimeUnit;
>>>
>>>  import com.ning.http.client.AsyncHttpClient;
>>> -import com.ning.http.client.websocket.WebSocket;
>>> -import com.ning.http.client.websocket.WebSocketTextListener;
>>> -import com.ning.http.client.websocket.WebSocketUpgradeHandler;
>>> +import com.ning.http.client.ws.WebSocket;
>>> +import com.ning.http.client.ws.WebSocketTextListener;
>>> +import com.ning.http.client.ws.WebSocketUpgradeHandler;
>>>  import org.apache.camel.builder.RouteBuilder;
>>>  import org.apache.camel.test.AvailablePortFinder;
>>>  import org.apache.camel.test.junit4.CamelTestSupport;
>>> @@ -59,10 +59,6 @@ public class WebsocketRouteExampleTest extends CamelTestSupport
{
>>>                      }
>>>
>>>                      @Override
>>> -                    public void onFragment(String fragment, boolean last) {
>>> -                    }
>>> -
>>> -                    @Override
>>>                      public void onOpen(WebSocket websocket) {
>>>                      }
>>>
>>> @@ -76,7 +72,7 @@ public class WebsocketRouteExampleTest extends CamelTestSupport
{
>>>                      }
>>>                  }).build()).get();
>>>
>>> -        websocket.sendTextMessage("Beer");
>>> +        websocket.sendMessage("Beer");
>>>          assertTrue(latch.await(10, TimeUnit.SECONDS));
>>>
>>>          assertEquals(1, received.size());
>>>
>>> http://git-wip-us.apache.org/repos/asf/camel/blob/5b4ac788/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketSSLContextInUriRouteExampleTest.java
>>> ----------------------------------------------------------------------
>>> diff --git a/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketSSLContextInUriRouteExampleTest.java
b/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketSSLContextInUriRouteExampleTest.java
>>> index 0987317..cd5a115 100644
>>> --- a/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketSSLContextInUriRouteExampleTest.java
>>> +++ b/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketSSLContextInUriRouteExampleTest.java
>>> @@ -27,9 +27,9 @@ import java.util.concurrent.TimeUnit;
>>>
>>>  import com.ning.http.client.AsyncHttpClient;
>>>  import com.ning.http.client.AsyncHttpClientConfig;
>>> -import com.ning.http.client.websocket.WebSocket;
>>> -import com.ning.http.client.websocket.WebSocketTextListener;
>>> -import com.ning.http.client.websocket.WebSocketUpgradeHandler;
>>> +import com.ning.http.client.ws.WebSocket;
>>> +import com.ning.http.client.ws.WebSocketTextListener;
>>> +import com.ning.http.client.ws.WebSocketUpgradeHandler;
>>>
>>>  import org.apache.camel.builder.RouteBuilder;
>>>  import org.apache.camel.impl.JndiRegistry;
>>> @@ -109,6 +109,7 @@ public class WebsocketSSLContextInUriRouteExampleTest extends
CamelTestSupport {
>>>                  new AsyncHttpClientConfig.Builder();
>>>
>>>          builder.setSSLContext(new SSLContextParameters().createSSLContext());
>>> +        builder.setHostnameVerifier(new AllowAllHostnameVerifier());
>>>          config = builder.build();
>>>          c = new AsyncHttpClient(config);
>>>
>>> @@ -129,9 +130,7 @@ public class WebsocketSSLContextInUriRouteExampleTest extends
CamelTestSupport {
>>>                                  latch.countDown();
>>>                              }
>>>
>>> -                            @Override
>>> -                            public void onFragment(String fragment, boolean
last) {
>>> -                            }
>>> +
>>>
>>>                              @Override
>>>                              public void onOpen(WebSocket websocket) {
>>> @@ -149,7 +148,7 @@ public class WebsocketSSLContextInUriRouteExampleTest extends
CamelTestSupport {
>>>
>>>          getMockEndpoint("mock:client").expectedBodiesReceived("Hello from WS
client");
>>>
>>> -        websocket.sendTextMessage("Hello from WS client");
>>> +        websocket.sendMessage("Hello from WS client");
>>>          assertTrue(latch.await(10, TimeUnit.SECONDS));
>>>
>>>          assertMockEndpointsSatisfied();
>>>
>>> http://git-wip-us.apache.org/repos/asf/camel/blob/5b4ac788/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketSSLRouteExampleTest.java
>>> ----------------------------------------------------------------------
>>> diff --git a/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketSSLRouteExampleTest.java
b/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketSSLRouteExampleTest.java
>>> index 2a8265d..12364b0 100644
>>> --- a/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketSSLRouteExampleTest.java
>>> +++ b/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketSSLRouteExampleTest.java
>>> @@ -27,9 +27,9 @@ import java.util.concurrent.TimeUnit;
>>>
>>>  import com.ning.http.client.AsyncHttpClient;
>>>  import com.ning.http.client.AsyncHttpClientConfig;
>>> -import com.ning.http.client.websocket.WebSocket;
>>> -import com.ning.http.client.websocket.WebSocketTextListener;
>>> -import com.ning.http.client.websocket.WebSocketUpgradeHandler;
>>> +import com.ning.http.client.ws.WebSocket;
>>> +import com.ning.http.client.ws.WebSocketTextListener;
>>> +import com.ning.http.client.ws.WebSocketUpgradeHandler;
>>>  import org.apache.camel.builder.RouteBuilder;
>>>  import org.apache.camel.test.AvailablePortFinder;
>>>  import org.apache.camel.test.junit4.CamelTestSupport;
>>> @@ -76,6 +76,7 @@ public class WebsocketSSLRouteExampleTest extends CamelTestSupport
{
>>>                  new AsyncHttpClientConfig.Builder();
>>>
>>>          builder.setSSLContext(new SSLContextParameters().createSSLContext());
>>> +        builder.setHostnameVerifier(new AllowAllHostnameVerifier());
>>>          config = builder.build();
>>>          c = new AsyncHttpClient(config);
>>>
>>> @@ -123,10 +124,7 @@ public class WebsocketSSLRouteExampleTest extends CamelTestSupport
{
>>>                                  latch.countDown();
>>>                              }
>>>
>>> -                            @Override
>>> -                            public void onFragment(String fragment, boolean
last) {
>>> -                            }
>>> -
>>> +
>>>                              @Override
>>>                              public void onOpen(WebSocket websocket) {
>>>                              }
>>> @@ -143,7 +141,7 @@ public class WebsocketSSLRouteExampleTest extends CamelTestSupport
{
>>>
>>>          getMockEndpoint("mock:client").expectedBodiesReceived("Hello from WS
client");
>>>
>>> -        websocket.sendTextMessage("Hello from WS client");
>>> +        websocket.sendMessage("Hello from WS client");
>>>          assertTrue(latch.await(10, TimeUnit.SECONDS));
>>>
>>>          assertMockEndpointsSatisfied();
>>>
>>> http://git-wip-us.apache.org/repos/asf/camel/blob/5b4ac788/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketTwoRoutesExampleTest.java
>>> ----------------------------------------------------------------------
>>> diff --git a/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketTwoRoutesExampleTest.java
b/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketTwoRoutesExampleTest.java
>>> index a3d850a..0c18045 100644
>>> --- a/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketTwoRoutesExampleTest.java
>>> +++ b/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketTwoRoutesExampleTest.java
>>> @@ -22,9 +22,9 @@ import java.util.concurrent.CountDownLatch;
>>>  import java.util.concurrent.TimeUnit;
>>>
>>>  import com.ning.http.client.AsyncHttpClient;
>>> -import com.ning.http.client.websocket.WebSocket;
>>> -import com.ning.http.client.websocket.WebSocketTextListener;
>>> -import com.ning.http.client.websocket.WebSocketUpgradeHandler;
>>> +import com.ning.http.client.ws.WebSocket;
>>> +import com.ning.http.client.ws.WebSocketTextListener;
>>> +import com.ning.http.client.ws.WebSocketUpgradeHandler;
>>>  import org.apache.camel.builder.RouteBuilder;
>>>  import org.apache.camel.test.AvailablePortFinder;
>>>  import org.apache.camel.test.junit4.CamelTestSupport;
>>> @@ -62,10 +62,6 @@ public class WebsocketTwoRoutesExampleTest extends CamelTestSupport
{
>>>                      }
>>>
>>>                      @Override
>>> -                    public void onFragment(String fragment, boolean last) {
>>> -                    }
>>> -
>>> -                    @Override
>>>                      public void onOpen(WebSocket websocket) {
>>>                      }
>>>
>>> @@ -79,7 +75,7 @@ public class WebsocketTwoRoutesExampleTest extends CamelTestSupport
{
>>>                      }
>>>                  }).build()).get();
>>>
>>> -        websocket.sendTextMessage("Beer");
>>> +        websocket.sendMessage("Beer");
>>>          assertTrue(latch.await(10, TimeUnit.SECONDS));
>>>
>>>          assertEquals(1, received.size());
>>> @@ -104,10 +100,7 @@ public class WebsocketTwoRoutesExampleTest extends CamelTestSupport
{
>>>                                  latch.countDown();
>>>                              }
>>>
>>> -                            @Override
>>> -                            public void onFragment(String fragment, boolean
last) {
>>> -                            }
>>> -
>>> +
>>>                              @Override
>>>                              public void onOpen(WebSocket websocket) {
>>>                              }
>>> @@ -122,7 +115,7 @@ public class WebsocketTwoRoutesExampleTest extends CamelTestSupport
{
>>>                              }
>>>                          }).build()).get();
>>>
>>> -        websocket.sendTextMessage("wine");
>>> +        websocket.sendMessage("wine");
>>>          assertTrue(latch.await(10, TimeUnit.SECONDS));
>>>
>>>          assertEquals(1, received.size());
>>>
>>> http://git-wip-us.apache.org/repos/asf/camel/blob/5b4ac788/parent/pom.xml
>>> ----------------------------------------------------------------------
>>> diff --git a/parent/pom.xml b/parent/pom.xml
>>> index 2cc2422..17062b6 100644
>>> --- a/parent/pom.xml
>>> +++ b/parent/pom.xml
>>> @@ -36,7 +36,7 @@
>>>      <abdera-version>1.1.3</abdera-version>
>>>      <!-- Note that activemq dependency is only used for testing! -->
>>>      <activemq-version>5.11.0</activemq-version>
>>> -    <ahc-version>1.8.14</ahc-version>
>>> +    <ahc-version>1.9.0</ahc-version>
>>>      <ant-bundle-version>1.7.0_6</ant-bundle-version>
>>>      <antlr-bundle-version>3.4_1</antlr-bundle-version>
>>>      <antlr-runtime-bundle-version>3.4_2</antlr-runtime-bundle-version>
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> Email: cibsen@redhat.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>> hawtio: http://hawt.io/
>> fabric8: http://fabric8.io/

Mime
View raw message