omarsmak commented on a change in pull request #3777: URL: https://github.com/apache/camel/pull/3777#discussion_r415609266
########## File path: components/camel-resteasy/pom.xml ########## @@ -0,0 +1,313 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + 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. + +--> +<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns="http://maven.apache.org/POM/4.0.0" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.camel</groupId> + <artifactId>components</artifactId> + <version>3.3.0-SNAPSHOT</version> + </parent> + + <artifactId>camel-resteasy</artifactId> + <packaging>jar</packaging> + <name>Camel :: Resteasy</name> + <description>Camel Resteasy support</description> + + <!-- + <properties> Review comment: There are some commented out dependencies and properties, would it make sense to clean them out? ########## File path: docs/components/modules/ROOT/pages/resteasy-component.adoc ########## @@ -0,0 +1,152 @@ +[[resteasy-component]] += Resteasy Component +//THIS FILE IS COPIED: EDIT THE SOURCE FILE: +:page-source: components/camel-resteasy/src/main/docs/resteasy-component.adoc +:docTitle: Resteasy +:artifactId: camel-resteasy +:description: Defines the Resteasy Endpoint. +:since: 3.3 +:supportLevel: Stable +:component-header: Only consumer is supported + +*Since Camel {since}* + +*{component-header}* + Review comment: Somewhat the documentation description looks missing though ########## File path: docs/components/modules/ROOT/pages/resteasy-component.adoc ########## @@ -0,0 +1,152 @@ +[[resteasy-component]] += Resteasy Component +//THIS FILE IS COPIED: EDIT THE SOURCE FILE: +:page-source: components/camel-resteasy/src/main/docs/resteasy-component.adoc +:docTitle: Resteasy +:artifactId: camel-resteasy +:description: Defines the Resteasy Endpoint. +:since: 3.3 +:supportLevel: Stable +:component-header: Only consumer is supported + +*Since Camel {since}* + +*{component-header}* + +=== Options + +// component options: START +The Resteasy component supports 22 options, which are listed below. + + + +[width="100%",cols="2,5,^1,2",options="header"] +|=== +| Name | Description | Default | Type +| *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 +| *httpRegistry* (consumer) | Sets httpRegistry which can be externalized to be used by camel | | HttpRegistry +| *proxyConsumersClasses* (consumer) | Sets the proxy class for consumer enpoints | | String +| *allowJavaSerializedObject* (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 +| *basicPropertyBinding* (advanced) | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean +| *clientConnectionManager* (advanced) | To use a custom and shared HttpClientConnectionManager to manage connections. If this has been configured then this is always used for all endpoints created by this component. | | HttpClientConnectionManager +| *connectionsPerRoute* (advanced) | The maximum number of connections per route. | 20 | int +| *connectionTimeToLive* (advanced) | The time for connection to live, the time unit is millisecond, the default value is always keep alive. | | long +| *httpBinding* (advanced) | To use a custom HttpBinding to control the mapping between Camel message and HttpClient. | | HttpBinding +| *httpClientConfigurer* (advanced) | To use the custom HttpClientConfigurer to perform configuration of the HttpClient that will be used. | | HttpClientConfigurer +| *httpConfiguration* (advanced) | To use the shared HttpConfiguration as base configuration. | | HttpConfiguration +| *httpContext* (advanced) | To use a custom org.apache.http.protocol.HttpContext when executing requests. | | HttpContext +| *maxTotalConnections* (advanced) | The maximum number of connections. | 200 | int +| *headerFilterStrategy* (filter) | To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message. | | HeaderFilterStrategy +| *sslContextParameters* (security) | To configure security using SSLContextParameters. Important: Only one instance of org.apache.camel.support.jsse.SSLContextParameters is supported per HttpComponent. If you need to use 2 or more different instances, you need to define a new HttpComponent per instance you need. | | SSLContextParameters +| *useGlobalSslContextParameters* (security) | Enable usage of global SSL context parameters. | false | boolean +| *x509HostnameVerifier* (security) | To use a custom X509HostnameVerifier such as DefaultHostnameVerifier or NoopHostnameVerifier. | | HostnameVerifier +| *connectionRequestTimeout* (timeout) | The timeout in milliseconds used when requesting a connection from the connection manager. A timeout value of zero is interpreted as an infinite timeout. A timeout value of zero is interpreted as an infinite timeout. A negative value is interpreted as undefined (system default). | -1 | int +| *connectTimeout* (timeout) | Determines the timeout in milliseconds until a connection is established. A timeout value of zero is interpreted as an infinite timeout. A timeout value of zero is interpreted as an infinite timeout. A negative value is interpreted as undefined (system default). | -1 | int +| *socketTimeout* (timeout) | Defines the socket timeout in milliseconds, which is the timeout for waiting for data or, put differently, a maximum period inactivity between two consecutive data packets). A timeout value of zero is interpreted as an infinite timeout. A negative value is interpreted as undefined (system default). | -1 | int +| *cookieStore* (producer) | To use a custom org.apache.http.client.CookieStore. By default the org.apache.http.impl.client.BasicCookieStore is used which is an in-memory only cookie store. Notice if bridgeEndpoint=true then the cookie store is forced to be a noop cookie store as cookie shouldn't be stored as we are just bridging (eg acting as a proxy). | | CookieStore +| *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. | false | boolean +|=== +// component options: END + + +// endpoint options: START +The Resteasy endpoint is configured using URI syntax: + +---- +resteasy:contextPath +---- + +with the following path and query parameters: + +=== Path Parameters (1 parameters): + + +[width="100%",cols="2,5,^1,2",options="header"] +|=== +| Name | Description | Default | Type +| *httpUri* | *Required* The url of the HTTP endpoint to call. | | URI +|=== + + +=== Query Parameters (72 parameters): + + +[width="100%",cols="2,5,^1,2",options="header"] +|=== +| Name | Description | Default | Type +| *httpBinding* (common) | To use a custom HttpBinding to control the mapping between Camel message and HttpClient. | | HttpBinding +| *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 +| *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 persistent store. DefaultHttpBinding will copy the request input stream into a stream cache and put it into message body if this option is false to support reading the stream multiple times. If you use Servlet to bridge/proxy an endpoint then consider enabling this option to improve performance, in case you do not need to read the message payload multiple times. The http producer will by default cache the response body stream. If setting this option to true, then the producers will not cache the response body stream but use the response stream as-is as the message body. | false | boolean +| *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 +| *camelProxy* (consumer) | Sets the flag to use camel for proxying without resteasy interfaces | | Boolean +| *headerFilterStrategy* (consumer) | To use a custom HeaderFilterStrategy to filter header to and from Camel message. | | HeaderFilterStrategy +| *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 +| *muteException* (consumer) | If enabled and an Exchange failed processing on the consumer side the response's body won't contain the exception's stack trace. | false | boolean +| *password* (consumer) | Sets the password | | String +| *proxy* (consumer) | Sets the flag to use the endpoint as proxy | | Boolean +| *proxyClientClass* (consumer) | Sets the resteasy proxyClientClass | | String +| *proxyMethod* (consumer) | Sets the proxy method defined in an interface | | String +| *responseBufferSize* (consumer) | To use a custom buffer size on the javax.servlet.ServletResponse. | | Integer +| *restEasyHttpBindingRef* (consumer) | Sets the restEasyHttpBinding if you have a customised one registered in the context | | ResteasyHttpBinding +| *resteasyMethod* (consumer) | Sets the resteasy method to process the request | | String +| *servletName* (consumer) | Sets the servlet name | | String +| *throwExceptionOnFailure* (consumer) | ets the flag to propogate the exception | 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 incoming data from the request to Java and that can be a potential security risk. | false | boolean +| *username* (consumer) | Sets the username | | String +| *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 +| *exchangePattern* (consumer) | Sets the exchange pattern when the consumer creates an exchange. The value can be one of: InOnly, InOut, InOptionalOut | | ExchangePattern +| *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 +| *basicPropertyBinding* (advanced) | Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean +| *clientBuilder* (advanced) | Provide access to the http client request parameters used on new RequestConfig instances used by producers or consumers of this endpoint. | | HttpClientBuilder +| *clientConnectionManager* (advanced) | To use a custom HttpClientConnectionManager to manage connections | | HttpClientConnectionManager +| *connectionsPerRoute* (advanced) | The maximum number of connections per route. | 20 | int +| *httpClient* (advanced) | Sets a custom HttpClient to be used by the producer | | HttpClient +| *httpClientConfigurer* (advanced) | Register a custom configuration strategy for new HttpClient instances created by producers or consumers such as to configure authentication mechanisms etc. | | HttpClientConfigurer +| *httpClientOptions* (advanced) | To configure the HttpClient using the key/values from the Map. | | Map +| *httpContext* (advanced) | To use a custom HttpContext instance | | HttpContext +| *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 +| *mapHttpMessageFormUrlEncoded Body* (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 +| *maxTotalConnections* (advanced) | The maximum number of connections. | 200 | int +| *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean +| *useSystemProperties* (advanced) | To use System Properties as fallback for configuration | false | boolean +| *sslContextParameters* (security) | To configure security using SSLContextParameters. Important: Only one instance of org.apache.camel.util.jsse.SSLContextParameters is supported per HttpComponent. If you need to use 2 or more different instances, you need to define a new HttpComponent per instance you need. | | SSLContextParameters +| *x509HostnameVerifier* (security) | To use a custom X509HostnameVerifier such as DefaultHostnameVerifier or NoopHostnameVerifier | | HostnameVerifier +| *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 +| *clearExpiredCookies* (producer) | Whether to clear expired cookies before sending the HTTP request. This ensures the cookies store does not keep growing by adding new cookies which is newer removed when they are expired. | true | boolean +| *connectionClose* (producer) | Specifies whether a Connection Close header must be added to HTTP Request. By default connectionClose is false. | false | boolean +| *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 +| *customHostHeader* (producer) | To use custom host header for producer. When not set in query will be ignored. When set will override host header derived from url. | | String +| *httpMethod* (producer) | Configure the HTTP method to use. The HttpMethod header cannot override this option if set. The value can be one of: GET, POST, PUT, DELETE, HEAD, OPTIONS, TRACE, PATCH | | HttpMethods +| *ignoreResponseBody* (producer) | If this option is true, The http producer won't read response body and cache the input stream | false | boolean +| *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. | 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 +| *cookieHandler* (producer) | Configure a cookie handler to maintain a HTTP session | | CookieHandler +| *cookieStore* (producer) | To use a custom CookieStore. By default the BasicCookieStore is used which is an in-memory only cookie store. Notice if bridgeEndpoint=true then the cookie store is forced to be a noop cookie store as cookie shouldn't be stored as we are just bridging (eg acting as a proxy). If a cookieHandler is set then the cookie store is also forced to be a noop cookie store as cookie handling is then performed by the cookieHandler. | | CookieStore +| *deleteWithBody* (producer) | Whether the HTTP DELETE should include the message body or not. By default HTTP DELETE do not include any HTTP body. However in some rare cases users may need to be able to include the message body. | false | boolean +| *getWithBody* (producer) | Whether the HTTP GET should include the message body or not. By default HTTP GET do not include any HTTP body. However in some rare cases users may need to be able to include the message body. | false | boolean +| *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 +| *proxyAuthDomain* (proxy) | Proxy authentication domain to use with NTML | | String +| *proxyAuthHost* (proxy) | Proxy authentication host | | String +| *proxyAuthMethod* (proxy) | Proxy authentication method to use. The value can be one of: Basic, Digest, NTLM | | String +| *proxyAuthPassword* (proxy) | Proxy authentication password | | String +| *proxyAuthPort* (proxy) | Proxy authentication port | | int +| *proxyAuthScheme* (proxy) | Proxy authentication scheme to use. The value can be one of: http, https | | String +| *proxyAuthUsername* (proxy) | Proxy authentication username | | String +| *proxyHost* (proxy) | Proxy hostname to use | | String +| *proxyPort* (proxy) | Proxy port to use | | int +| *authDomain* (security) | Authentication domain to use with NTML | | String +| *authenticationPreemptive* (security) | If this option is true, camel-http sends preemptive basic authentication to the server. | false | boolean +| *authHost* (security) | Authentication host to use with NTML | | String +| *authMethod* (security) | Authentication methods allowed to use as a comma separated list of values Basic, Digest or NTLM. | | String +| *authMethodPriority* (security) | Which authentication method to prioritize to use, either as Basic, Digest or NTLM. The value can be one of: Basic, Digest, NTLM | | String +| *authPassword* (security) | Authentication password | | String +| *authUsername* (security) | Authentication username | | String +|=== +// endpoint options: END + +=== Samples Review comment: Samples as well ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org