camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject [camel] 02/02: CAMEL-11474 - Fixed CS
Date Wed, 03 Jan 2018 10:26:51 GMT
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit d0d5dfc22b983ab20cef4da3bfa2282c1894e78e
Author: Andrea Cosentino <ancosen@gmail.com>
AuthorDate: Wed Jan 3 11:24:57 2018 +0100

    CAMEL-11474 - Fixed CS
---
 .../camel-hipchat/src/main/docs/hipchat-component.adoc   |  4 ++--
 .../apache/camel/component/hipchat/HipchatConsumer.java  |  8 ++++----
 .../apache/camel/component/hipchat/HipchatProducer.java  |  6 +++---
 .../hipchat/HipchatComponentCustomHttpClientTest.java    | 16 ++++++++++++++++
 4 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/components/camel-hipchat/src/main/docs/hipchat-component.adoc b/components/camel-hipchat/src/main/docs/hipchat-component.adoc
index 7c9814d..51fa1e8 100644
--- a/components/camel-hipchat/src/main/docs/hipchat-component.adoc
+++ b/components/camel-hipchat/src/main/docs/hipchat-component.adoc
@@ -53,13 +53,14 @@ with the following path and query parameters:
 | *port* | The port for the hipchat server. Is by default 80. | 80 | Integer
 |===
 
-==== Query Parameters (21 parameters):
+==== Query Parameters (22 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
 | *authToken* (common) | OAuth 2 auth token |  | String
 | *consumeUsers* (common) | Username(s) when consuming messages from the hiptchat server.
Multiple user names can be separated by comma. |  | String
+| *httpClient* (common) | The CloseableHttpClient reference from registry to be used during
API HTTP requests. | CloseableHttpClient default from HttpClient library | CloseableHttpClient
 | *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing
Error Handler which mean any exceptions occurred while the consumer is trying to pickup incoming
messages or the likes will now be processed as a message and handled by the routing Error
Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal
with exceptions that will be logged at WARN or ERROR level and ignored. | false | boolean
 | *sendEmptyMessageWhenIdle* (consumer) | If the polling consumer did not poll any files
you can enable this option to send an empty message (no body) instead. | false | boolean
 | *exceptionHandler* (consumer) | To let the consumer use a custom ExceptionHandler. Notice
if the option bridgeErrorHandler is enabled then this options is not in use. By default the
consumer will deal with exceptions that will be logged at WARN or ERROR level and ignored.
|  | ExceptionHandler
@@ -79,7 +80,6 @@ with the following path and query parameters:
 | *startScheduler* (scheduler) | Whether the scheduler should be auto started. | true | boolean
 | *timeUnit* (scheduler) | Time unit for initialDelay and delay options. | MILLISECONDS |
TimeUnit
 | *useFixedDelay* (scheduler) | Controls if fixed delay or fixed rate is used. See ScheduledExecutorService
in JDK for details. | true | boolean
-| *httpClient* | The custom `CloseableHttpClient` reference from registry to be used during
API HTTP requests. Could be configured using Http Client class `HttpClientBuilder`. | Default
`CloseableHttpClinent` from HttpClient library | org.apache.http.impl.client.CloseableHttpClient
 |===
 // endpoint options: END
 
diff --git a/components/camel-hipchat/src/main/java/org/apache/camel/component/hipchat/HipchatConsumer.java
b/components/camel-hipchat/src/main/java/org/apache/camel/component/hipchat/HipchatConsumer.java
index 39a6917..8947729 100644
--- a/components/camel-hipchat/src/main/java/org/apache/camel/component/hipchat/HipchatConsumer.java
+++ b/components/camel-hipchat/src/main/java/org/apache/camel/component/hipchat/HipchatConsumer.java
@@ -22,6 +22,10 @@ import java.util.List;
 import java.util.Map;
 import java.util.TimeZone;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.type.MapType;
+import com.fasterxml.jackson.databind.type.TypeFactory;
+
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.impl.ScheduledPollConsumer;
@@ -31,10 +35,6 @@ import org.apache.http.client.methods.HttpGet;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.type.MapType;
-import com.fasterxml.jackson.databind.type.TypeFactory;
-
 /**
  * The Hipchat consumer consumes messages from a list of users.
  */
diff --git a/components/camel-hipchat/src/main/java/org/apache/camel/component/hipchat/HipchatProducer.java
b/components/camel-hipchat/src/main/java/org/apache/camel/component/hipchat/HipchatProducer.java
index 739ec56..0b4225e 100644
--- a/components/camel-hipchat/src/main/java/org/apache/camel/component/hipchat/HipchatProducer.java
+++ b/components/camel-hipchat/src/main/java/org/apache/camel/component/hipchat/HipchatProducer.java
@@ -16,12 +16,12 @@
  */
 package org.apache.camel.component.hipchat;
 
-import static org.apache.camel.util.UnsafeUriCharactersEncoder.encodeHttpURI;
-
 import java.io.IOException;
 import java.util.HashMap;
 import java.util.Map;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
+
 import org.apache.camel.Exchange;
 import org.apache.camel.InvalidPayloadException;
 import org.apache.camel.Message;
@@ -35,7 +35,7 @@ import org.apache.http.entity.StringEntity;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.fasterxml.jackson.databind.ObjectMapper;
+import static org.apache.camel.util.UnsafeUriCharactersEncoder.encodeHttpURI;
 
 /**
  * The Hipchat producer to send message to a user and/or a room.
diff --git a/components/camel-hipchat/src/test/java/org/apache/camel/component/hipchat/HipchatComponentCustomHttpClientTest.java
b/components/camel-hipchat/src/test/java/org/apache/camel/component/hipchat/HipchatComponentCustomHttpClientTest.java
index 4e96d88..56d0439 100644
--- a/components/camel-hipchat/src/test/java/org/apache/camel/component/hipchat/HipchatComponentCustomHttpClientTest.java
+++ b/components/camel-hipchat/src/test/java/org/apache/camel/component/hipchat/HipchatComponentCustomHttpClientTest.java
@@ -1,3 +1,19 @@
+/**
+ * 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.hipchat;
 
 import java.io.IOException;

-- 
To stop receiving notification emails like this one, please contact
"commits@camel.apache.org" <commits@camel.apache.org>.

Mime
View raw message