This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit 4e005d299f1ad2b8938d873f8846fc1cafb49d55 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Wed Jun 5 10:31:18 2019 +0200 CAMEL-13220: Remove deprecated producer. CAMEL-13612: camel-rest should seperate producer vs consumer component name. --- .../camel/http/common/HttpCommonEndpoint.java | 2 +- .../camel-jetty/src/main/docs/jetty-component.adoc | 40 ++++++---------------- .../camel/component/jetty9/JettyHttpEndpoint9.java | 2 +- 3 files changed, 12 insertions(+), 32 deletions(-) diff --git a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java index b6264c3..6a66dc4 100644 --- a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java +++ b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java @@ -37,7 +37,7 @@ public abstract class HttpCommonEndpoint extends DefaultEndpoint implements Head HttpCommonComponent component; - @UriPath(label = "producer", description = "The url of the HTTP endpoint to call.") @Metadata(required = true) + @UriPath(label = "common", description = "The url of the HTTP endpoint to call.") @Metadata(required = true) URI httpUri; @UriParam(label = "common", description = "To use a custom HeaderFilterStrategy to filter header to and from Camel message.") HeaderFilterStrategy headerFilterStrategy = new HttpHeaderFilterStrategy(); diff --git a/components/camel-jetty/src/main/docs/jetty-component.adoc b/components/camel-jetty/src/main/docs/jetty-component.adoc index 7e30f84..0371910 100644 --- a/components/camel-jetty/src/main/docs/jetty-component.adoc +++ b/components/camel-jetty/src/main/docs/jetty-component.adoc @@ -67,7 +67,7 @@ The Jetty component supports 34 options, which are listed below. | *minThreads* (consumer) | To set a value for minimum number of threads in server thread pool. Notice that both a min and max size must be configured. | | Integer | *maxThreads* (consumer) | To set a value for maximum number of threads in server thread pool. Notice that both a min and max size must be configured. | | Integer | *threadPool* (consumer) | To use a custom thread pool for the server. This option should only be used in special circumstances. | | ThreadPool -| *enableJmx* (common) | If this option is true, Jetty JMX support will be enabled for this endpoint. | false | boolean +| *enableJmx* (consumer) | If this option is true, Jetty JMX support will be enabled for this endpoint. | false | boolean | *jettyHttpBinding* (advanced) | To use a custom org.apache.camel.component.jetty.JettyHttpBinding, which are used to customize how a response should be written for the producer. | | JettyHttpBinding | *httpBinding* (advanced) | Not to be used - use JettyHttpBinding instead. | | HttpBinding | *httpConfiguration* (advanced) | Jetty component does not use HttpConfiguration. | | HttpConfiguration @@ -78,13 +78,13 @@ The Jetty component supports 34 options, which are listed below. | *useContinuation* (consumer) | Whether or not to use Jetty continuations for the Jetty Server. | true | boolean | *sslContextParameters* (security) | To configure security using SSLContextParameters | | SSLContextParameters | *useGlobalSslContext Parameters* (security) | Enable usage of global SSL context parameters | false | boolean -| *responseBufferSize* (common) | Allows to configure a custom value of the response buffer size on the Jetty connectors. | | Integer -| *requestBufferSize* (common) | Allows to configure a custom value of the request buffer size on the Jetty connectors. | | Integer -| *requestHeaderSize* (common) | Allows to configure a custom value of the request header size on the Jetty connectors. | | Integer -| *responseHeaderSize* (common) | Allows to configure a custom value of the response header size on the Jetty connectors. | | Integer +| *responseBufferSize* (consumer) | Allows to configure a custom value of the response buffer size on the Jetty connectors. | | Integer +| *requestBufferSize* (consumer) | Allows to configure a custom value of the request buffer size on the Jetty connectors. | | Integer +| *requestHeaderSize* (consumer) | Allows to configure a custom value of the request header size on the Jetty connectors. | | Integer +| *responseHeaderSize* (consumer) | Allows to configure a custom value of the response header size on the Jetty connectors. | | Integer | *proxyHost* (proxy) | To use a http proxy to configure the hostname. | | String | *proxyPort* (proxy) | To use a http proxy to configure the port number. | | Integer -| *useXForwardedFor Header* (common) | To use the X-Forwarded-For header in HttpServletRequest.getRemoteAddr. | false | boolean +| *useXForwardedFor Header* (consumer) | To use the X-Forwarded-For header in HttpServletRequest.getRemoteAddr. | false | boolean | *sendServerVersion* (consumer) | If the option is true, jetty will send the server header with the jetty version information to the client which sends the request. NOTE please make sure there is no any other camel-jetty endpoint is share the same port, otherwise this option may not work as expected. | true | boolean | *allowJavaSerialized Object* (advanced) | Whether to allow java serialization when a request uses context-type=application/x-java-serialized-object. This is by default turned off. If you enable this then be aware that Java will deserialize the incoming data from the request to Java and that can be a potential security risk. | false | boolean | *headerFilterStrategy* (filter) | To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message. | | HeaderFilterStrategy @@ -120,29 +120,29 @@ with the following path and query parameters: |=== -==== Query Parameters (55 parameters): +==== Query Parameters (35 parameters): [width="100%",cols="2,5,^1,2",options="header"] |=== | Name | Description | Default | Type -| *chunked* (common) | If this option is false the Servlet will disable the HTTP streaming and set the content-length header on the response | true | boolean | *disableStreamCache* (common) | Determines whether or not the raw input stream from Servlet is cached or not (Camel will read the stream into a in memory/overflow to file, Stream caching) cache. By default Camel will cache the Servlet input stream to support reading it multiple times to ensure it Camel can retrieve all data from the stream. However you can set this option to true when you for example need to access the raw stream, such as streaming it directly to a file or other persis [...] -| *enableMultipartFilter* (common) | Whether Jetty org.eclipse.jetty.servlets.MultiPartFilter is enabled or not. You should set this value to false when bridging endpoints, to ensure multipart requests is proxied/bridged as well. | false | boolean | *headerFilterStrategy* (common) | To use a custom HeaderFilterStrategy to filter header to and from Camel message. | | HeaderFilterStrategy -| *transferException* (common) | If enabled and an Exchange failed processing on the consumer side, and if the caused Exception was send back serialized in the response as a application/x-java-serialized-object content type. On the producer side the exception will be deserialized and thrown as is, instead of the HttpOperationFailedException. The caused exception is required to be serialized. This is by default turned off. If you enable this then be aware that Java will deserialize the in [...] | *httpBinding* (common) | To use a custom HttpBinding to control the mapping between Camel message and HttpClient. | | HttpBinding | *async* (consumer) | Configure the consumer to work in async mode | false | boolean | *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 +| *chunked* (consumer) | If this option is false the Servlet will disable the HTTP streaming and set the content-length header on the response | true | boolean | *continuationTimeout* (consumer) | Allows to set a timeout in millis when using Jetty as consumer (server). By default Jetty uses 30000. You can use a value of = 0 to never expire. If a timeout occurs then the request will be expired and Jetty will return back a http error 503 to the client. This option is only in use when using Jetty with the Asynchronous Routing Engine. | 30000 | Long | *enableCORS* (consumer) | If the option is true, Jetty server will setup the CrossOriginFilter which supports the CORS out of box. | false | boolean | *enableJmx* (consumer) | If this option is true, Jetty JMX support will be enabled for this endpoint. See Jetty JMX support for more details. | false | boolean +| *enableMultipartFilter* (consumer) | Whether Jetty org.eclipse.jetty.servlets.MultiPartFilter is enabled or not. You should set this value to false when bridging endpoints, to ensure multipart requests is proxied/bridged as well. | false | boolean | *httpMethodRestrict* (consumer) | Used to only allow consuming if the HttpMethod matches, such as GET/POST/PUT etc. Multiple methods can be specified separated by comma. | | String | *matchOnUriPrefix* (consumer) | Whether or not the consumer should try to find a target consumer by matching the URI prefix if no exact match is found. | false | boolean | *responseBufferSize* (consumer) | To use a custom buffer size on the javax.servlet.ServletResponse. | | Integer | *sendDateHeader* (consumer) | If the option is true, jetty server will send the date header to the client which sends the request. NOTE please make sure there is no any other camel-jetty endpoint is share the same port, otherwise this option may not work as expected. | false | boolean | *sendServerVersion* (consumer) | If the option is true, jetty will send the server header with the jetty version information to the client which sends the request. NOTE please make sure there is no any other camel-jetty endpoint is share the same port, otherwise this option may not work as expected. | true | boolean | *sessionSupport* (consumer) | Specifies whether to enable the session manager on the server side of Jetty. | false | boolean +| *transferException* (consumer) | If enabled and an Exchange failed processing on the consumer side, and if the caused Exception was send back serialized in the response as a application/x-java-serialized-object content type. On the producer side the exception will be deserialized and thrown as is, instead of the HttpOperationFailedException. The caused exception is required to be serialized. This is by default turned off. If you enable this then be aware that Java will deserialize the [...] | *useContinuation* (consumer) | Whether or not to use Jetty continuations for the Jetty Server. | | Boolean | *eagerCheckContentAvailable* (consumer) | Whether to eager check whether the HTTP requests has content if the content-length header is 0 or not present. This can be turned on in case HTTP clients do not send streamed data. | false | boolean | *exceptionHandler* (consumer) | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored. | | ExceptionHandler @@ -155,31 +155,11 @@ with the following path and query parameters: | *multipartFilterRef* (consumer) | *Deprecated* Allows using a custom multipart filter. Note: setting multipartFilterRef forces the value of enableMultipartFilter to true. | | String | *optionsEnabled* (consumer) | Specifies whether to enable HTTP OPTIONS for this Servlet consumer. By default OPTIONS is turned off. | false | boolean | *traceEnabled* (consumer) | Specifies whether to enable HTTP TRACE for this Servlet consumer. By default TRACE is turned off. | false | boolean -| *bridgeEndpoint* (producer) | If the option is true, HttpProducer will ignore the Exchange.HTTP_URI header, and use the endpoint's URI for request. You may also set the option throwExceptionOnFailure to be false to let the HttpProducer send all the fault response back. | false | boolean -| *connectionClose* (producer) | Specifies whether a Connection Close header must be added to HTTP Request. By default connectionClose is false. | false | boolean -| *cookieHandler* (producer) | Configure a cookie handler to maintain a HTTP session | | CookieHandler -| *copyHeaders* (producer) | If this option is true then IN exchange headers will be copied to OUT exchange headers according to copy strategy. Setting this to false, allows to only include the headers from the HTTP response (not propagating IN headers). | true | boolean -| *httpClientMaxThreads* (producer) | To set a value for maximum number of threads in HttpClient thread pool. This setting override any setting configured on component level. Notice that both a min and max size must be configured. If not set it default to max 254 threads used in Jettys thread pool. | 254 | Integer -| *httpClientMinThreads* (producer) | To set a value for minimum number of threads in HttpClient thread pool. This setting override any setting configured on component level. Notice that both a min and max size must be configured. If not set it default to min 8 threads used in Jettys thread pool. | 8 | Integer -| *httpMethod* (producer) | Configure the HTTP method to use. The HttpMethod header cannot override this option if set. | | HttpMethods -| *ignoreResponseBody* (producer) | If this option is true, The http producer won't read response body and cache the input stream | false | boolean -| *preserveHostHeader* (producer) | If the option is true, HttpProducer will set the Host header to the value contained in the current exchange Host header, useful in reverse proxy applications where you want the Host header received by the downstream server to reflect the URL called by the upstream client, this allows applications which use the Host header to generate accurate URL's for a proxied service | false | boolean -| *throwExceptionOnFailure* (producer) | Option to disable throwing the HttpOperationFailedException in case of failed responses from the remote server. This allows you to get all responses regardless of the HTTP status code. | true | boolean -| *httpClient* (producer) | Sets a shared HttpClient to use for all producers created by this endpoint. By default each producer will use a new http client, and not share. Important: Make sure to handle the lifecycle of the shared client, such as stopping the client, when it is no longer in use. Camel will call the start method on the client to ensure its started when this endpoint creates a producer. This options should only be used in special circumstances. | | HttpClient -| *httpClientParameters* (producer) | Configuration of Jetty's HttpClient. For example, setting httpClient.idleTimeout=30000 sets the idle timeout to 30 seconds. And httpClient.timeout=30000 sets the request timeout to 30 seconds, in case you want to timeout sooner if you have long running request/response calls. | | Map -| *jettyBinding* (producer) | To use a custom JettyHttpBinding which be used to customize how a response should be written for the producer. | | JettyHttpBinding -| *jettyBindingRef* (producer) | *Deprecated* To use a custom JettyHttpBinding which be used to customize how a response should be written for the producer. | | String -| *okStatusCodeRange* (producer) | The status codes which are considered a success response. The values are inclusive. Multiple ranges can be defined, separated by comma, e.g. 200-204,209,301-304. Each range must be a single number or from-to with the dash included. | 200-299 | String -| *urlRewrite* (producer) | *Deprecated* Refers to a custom org.apache.camel.component.http.UrlRewrite which allows you to rewrite urls when you bridge/proxy endpoints. See more details at http://camel.apache.org/urlrewrite.html | | UrlRewrite | *basicPropertyBinding* (advanced) | Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean | *mapHttpMessageBody* (advanced) | If this option is true then IN exchange Body of the exchange will be mapped to HTTP body. Setting this to false will avoid the HTTP mapping. | true | boolean | *mapHttpMessageFormUrl EncodedBody* (advanced) | If this option is true then IN exchange Form Encoded body of the exchange will be mapped to HTTP. Setting this to false will avoid the HTTP Form Encoded body mapping. | true | boolean | *mapHttpMessageHeaders* (advanced) | If this option is true then IN exchange Headers of the exchange will be mapped to HTTP headers. Setting this to false will avoid the HTTP Headers mapping. | true | boolean | *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean -| *proxyAuthScheme* (proxy) | Proxy authentication scheme to use | | String -| *proxyHost* (proxy) | Proxy hostname to use | | String -| *proxyPort* (proxy) | Proxy port to use | | int -| *authHost* (security) | Authentication host to use with NTML | | String | *sslContextParameters* (security) | To configure security using SSLContextParameters | | SSLContextParameters |=== // endpoint options: END diff --git a/components/camel-jetty/src/main/java/org/apache/camel/component/jetty9/JettyHttpEndpoint9.java b/components/camel-jetty/src/main/java/org/apache/camel/component/jetty9/JettyHttpEndpoint9.java index 30db375..3425065 100644 --- a/components/camel-jetty/src/main/java/org/apache/camel/component/jetty9/JettyHttpEndpoint9.java +++ b/components/camel-jetty/src/main/java/org/apache/camel/component/jetty9/JettyHttpEndpoint9.java @@ -31,7 +31,7 @@ import org.apache.camel.spi.UriEndpoint; * The jetty component provides HTTP-based endpoints for consuming and producing HTTP requests. */ @UriEndpoint(firstVersion = "1.2.0", scheme = "jetty", extendsScheme = "http", title = "Jetty", - syntax = "jetty:httpUri", label = "http", lenientProperties = true, + syntax = "jetty:httpUri", label = "http", consumerOnly = true, lenientProperties = true, excludeProperties = "authMethod,authMethodPriority,authUsername,authPassword,authDomain,authHost" + "proxyAuthScheme,proxyAuthMethod,proxyAuthUsername,proxyAuthPassword,proxyAuthHost,proxyAuthPort,proxyAuthDomain") public class JettyHttpEndpoint9 extends JettyHttpEndpoint implements AsyncEndpoint {