Interface HttpComponentBuilderFactory.HttpComponentBuilder
- All Superinterfaces:
ComponentBuilder<org.apache.camel.component.http.HttpComponent>
- All Known Implementing Classes:
HttpComponentBuilderFactory.HttpComponentBuilderImpl
- Enclosing interface:
HttpComponentBuilderFactory
public static interface HttpComponentBuilderFactory.HttpComponentBuilder
extends ComponentBuilder<org.apache.camel.component.http.HttpComponent>
Builder for the HTTP component.
-
Method Summary
Modifier and TypeMethodDescriptionallowJavaSerializedObject
(boolean allowJavaSerializedObject) Whether to allow java serialization when a request uses context-type=application/x-java-serialized-object.authCachingDisabled
(boolean authCachingDisabled) Disables authentication scheme caching.automaticRetriesDisabled
(boolean automaticRetriesDisabled) Disables automatic request recovery and re-execution.autowiredEnabled
(boolean autowiredEnabled) Whether autowiring is enabled.clientConnectionManager
(org.apache.hc.client5.http.io.HttpClientConnectionManager clientConnectionManager) To use a custom and shared HttpClientConnectionManager to manage connections.connectionRequestTimeout
(org.apache.hc.core5.util.Timeout connectionRequestTimeout) Returns the connection lease request timeout used when requesting a connection from the connection manager.connectionsPerRoute
(int connectionsPerRoute) The maximum number of connections per route.connectionStateDisabled
(boolean connectionStateDisabled) Disables connection state tracking.connectionTimeToLive
(long connectionTimeToLive) The time for connection to live, the time unit is millisecond, the default value is always keep alive.connectTimeout
(org.apache.hc.core5.util.Timeout connectTimeout) Determines the timeout until a new connection is fully established.contentCompressionDisabled
(boolean contentCompressionDisabled) Disables automatic content decompression.cookieManagementDisabled
(boolean cookieManagementDisabled) Disables state (cookie) management.cookieStore
(org.apache.hc.client5.http.cookie.CookieStore cookieStore) To use a custom org.apache.hc.client5.http.cookie.CookieStore.copyHeaders
(boolean copyHeaders) If this option is true then IN exchange headers will be copied to OUT exchange headers according to copy strategy.defaultUserAgentDisabled
(boolean defaultUserAgentDisabled) Disables the default user agent set by this builder if none has been provided by the user.followRedirects
(boolean followRedirects) Whether to the HTTP request should follow redirects.headerFilterStrategy
(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy) To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message.httpBinding
(org.apache.camel.http.common.HttpBinding httpBinding) To use a custom HttpBinding to control the mapping between Camel message and HttpClient.httpClientConfigurer
(org.apache.camel.component.http.HttpClientConfigurer httpClientConfigurer) To use the custom HttpClientConfigurer to perform configuration of the HttpClient that will be used.httpConfiguration
(org.apache.camel.http.common.HttpConfiguration httpConfiguration) To use the shared HttpConfiguration as base configuration.httpContext
(org.apache.hc.core5.http.protocol.HttpContext httpContext) To use a custom org.apache.hc.core5.http.protocol.HttpContext when executing requests.lazyStartProducer
(boolean lazyStartProducer) Whether the producer should be started lazy (on the first message).maxTotalConnections
(int maxTotalConnections) The maximum number of connections.proxyAuthDomain
(String proxyAuthDomain) Proxy authentication domain to use.proxyAuthHost
(String proxyAuthHost) Proxy authentication host.proxyAuthMethod
(String proxyAuthMethod) Proxy authentication method to use.proxyAuthNtHost
(String proxyAuthNtHost) Proxy authentication domain (workstation name) to use with NTML.proxyAuthPassword
(String proxyAuthPassword) Proxy authentication password.proxyAuthPort
(Integer proxyAuthPort) Proxy authentication port.proxyAuthScheme
(String proxyAuthScheme) Proxy authentication protocol scheme.proxyAuthUsername
(String proxyAuthUsername) Proxy authentication username.redirectHandlingDisabled
(boolean redirectHandlingDisabled) Disables automatic redirect handling.responsePayloadStreamingThreshold
(int responsePayloadStreamingThreshold) This threshold in bytes controls whether the response payload should be stored in memory as a byte array or be streaming based.responseTimeout
(org.apache.hc.core5.util.Timeout responseTimeout) Determines the timeout until arrival of a response from the opposite endpoint.skipRequestHeaders
(boolean skipRequestHeaders) Whether to skip mapping all the Camel headers as HTTP request headers.skipResponseHeaders
(boolean skipResponseHeaders) Whether to skip mapping all the HTTP response headers to Camel headers.soTimeout
(org.apache.hc.core5.util.Timeout soTimeout) Determines the default socket timeout value for blocking I/O operations.sslContextParameters
(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters) To configure security using SSLContextParameters.useGlobalSslContextParameters
(boolean useGlobalSslContextParameters) Enable usage of global SSL context parameters.x509HostnameVerifier
(HostnameVerifier x509HostnameVerifier) To use a custom X509HostnameVerifier such as DefaultHostnameVerifier or NoopHostnameVerifier.Methods inherited from interface org.apache.camel.builder.component.ComponentBuilder
build, build, doSetProperty, register
-
Method Details
-
followRedirects
Whether to the HTTP request should follow redirects. By default the HTTP request does not follow redirects. The option is a: <code>boolean</code> type. Default: false Group: producer- Parameters:
followRedirects
- the value to set- Returns:
- the dsl builder
-
lazyStartProducer
default HttpComponentBuilderFactory.HttpComponentBuilder lazyStartProducer(boolean lazyStartProducer) 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. The option is a: <code>boolean</code> type. Default: false Group: producer- Parameters:
lazyStartProducer
- the value to set- Returns:
- the dsl builder
-
cookieStore
default HttpComponentBuilderFactory.HttpComponentBuilder cookieStore(org.apache.hc.client5.http.cookie.CookieStore cookieStore) To use a custom org.apache.hc.client5.http.cookie.CookieStore. By default the org.apache.hc.client5.http.cookie.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). The option is a: <code>org.apache.hc.client5.http.cookie.CookieStore</code> type. Group: producer (advanced)- Parameters:
cookieStore
- the value to set- Returns:
- the dsl builder
-
copyHeaders
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). The option is a: <code>boolean</code> type. Default: true Group: producer (advanced)- Parameters:
copyHeaders
- the value to set- Returns:
- the dsl builder
-
responsePayloadStreamingThreshold
default HttpComponentBuilderFactory.HttpComponentBuilder responsePayloadStreamingThreshold(int responsePayloadStreamingThreshold) This threshold in bytes controls whether the response payload should be stored in memory as a byte array or be streaming based. Set this to -1 to always use streaming mode. The option is a: <code>int</code> type. Default: 8192 Group: producer (advanced)- Parameters:
responsePayloadStreamingThreshold
- the value to set- Returns:
- the dsl builder
-
skipRequestHeaders
default HttpComponentBuilderFactory.HttpComponentBuilder skipRequestHeaders(boolean skipRequestHeaders) Whether to skip mapping all the Camel headers as HTTP request headers. If there are no data from Camel headers needed to be included in the HTTP request then this can avoid parsing overhead with many object allocations for the JVM garbage collector. The option is a: <code>boolean</code> type. Default: false Group: producer (advanced)- Parameters:
skipRequestHeaders
- the value to set- Returns:
- the dsl builder
-
skipResponseHeaders
default HttpComponentBuilderFactory.HttpComponentBuilder skipResponseHeaders(boolean skipResponseHeaders) Whether to skip mapping all the HTTP response headers to Camel headers. If there are no data needed from HTTP headers then this can avoid parsing overhead with many object allocations for the JVM garbage collector. The option is a: <code>boolean</code> type. Default: false Group: producer (advanced)- Parameters:
skipResponseHeaders
- the value to set- Returns:
- the dsl builder
-
allowJavaSerializedObject
default HttpComponentBuilderFactory.HttpComponentBuilder allowJavaSerializedObject(boolean allowJavaSerializedObject) 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. The option is a: <code>boolean</code> type. Default: false Group: advanced- Parameters:
allowJavaSerializedObject
- the value to set- Returns:
- the dsl builder
-
authCachingDisabled
default HttpComponentBuilderFactory.HttpComponentBuilder authCachingDisabled(boolean authCachingDisabled) Disables authentication scheme caching. The option is a: <code>boolean</code> type. Default: false Group: advanced- Parameters:
authCachingDisabled
- the value to set- Returns:
- the dsl builder
-
automaticRetriesDisabled
default HttpComponentBuilderFactory.HttpComponentBuilder automaticRetriesDisabled(boolean automaticRetriesDisabled) Disables automatic request recovery and re-execution. The option is a: <code>boolean</code> type. Default: false Group: advanced- Parameters:
automaticRetriesDisabled
- the value to set- Returns:
- the dsl builder
-
autowiredEnabled
Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. The option is a: <code>boolean</code> type. Default: true Group: advanced- Parameters:
autowiredEnabled
- the value to set- Returns:
- the dsl builder
-
clientConnectionManager
default HttpComponentBuilderFactory.HttpComponentBuilder clientConnectionManager(org.apache.hc.client5.http.io.HttpClientConnectionManager clientConnectionManager) 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. The option is a: <code>org.apache.hc.client5.http.io.HttpClientConnectionManager</code> type. Group: advanced- Parameters:
clientConnectionManager
- the value to set- Returns:
- the dsl builder
-
connectionsPerRoute
default HttpComponentBuilderFactory.HttpComponentBuilder connectionsPerRoute(int connectionsPerRoute) The maximum number of connections per route. The option is a: <code>int</code> type. Default: 20 Group: advanced- Parameters:
connectionsPerRoute
- the value to set- Returns:
- the dsl builder
-
connectionStateDisabled
default HttpComponentBuilderFactory.HttpComponentBuilder connectionStateDisabled(boolean connectionStateDisabled) Disables connection state tracking. The option is a: <code>boolean</code> type. Default: false Group: advanced- Parameters:
connectionStateDisabled
- the value to set- Returns:
- the dsl builder
-
connectionTimeToLive
default HttpComponentBuilderFactory.HttpComponentBuilder connectionTimeToLive(long connectionTimeToLive) The time for connection to live, the time unit is millisecond, the default value is always keep alive. The option is a: <code>long</code> type. Group: advanced- Parameters:
connectionTimeToLive
- the value to set- Returns:
- the dsl builder
-
contentCompressionDisabled
default HttpComponentBuilderFactory.HttpComponentBuilder contentCompressionDisabled(boolean contentCompressionDisabled) Disables automatic content decompression. The option is a: <code>boolean</code> type. Default: false Group: advanced- Parameters:
contentCompressionDisabled
- the value to set- Returns:
- the dsl builder
-
cookieManagementDisabled
default HttpComponentBuilderFactory.HttpComponentBuilder cookieManagementDisabled(boolean cookieManagementDisabled) Disables state (cookie) management. The option is a: <code>boolean</code> type. Default: false Group: advanced- Parameters:
cookieManagementDisabled
- the value to set- Returns:
- the dsl builder
-
defaultUserAgentDisabled
default HttpComponentBuilderFactory.HttpComponentBuilder defaultUserAgentDisabled(boolean defaultUserAgentDisabled) Disables the default user agent set by this builder if none has been provided by the user. The option is a: <code>boolean</code> type. Default: false Group: advanced- Parameters:
defaultUserAgentDisabled
- the value to set- Returns:
- the dsl builder
-
httpBinding
default HttpComponentBuilderFactory.HttpComponentBuilder httpBinding(org.apache.camel.http.common.HttpBinding httpBinding) To use a custom HttpBinding to control the mapping between Camel message and HttpClient. The option is a: <code>org.apache.camel.http.common.HttpBinding</code> type. Group: advanced- Parameters:
httpBinding
- the value to set- Returns:
- the dsl builder
-
httpClientConfigurer
default HttpComponentBuilderFactory.HttpComponentBuilder httpClientConfigurer(org.apache.camel.component.http.HttpClientConfigurer httpClientConfigurer) To use the custom HttpClientConfigurer to perform configuration of the HttpClient that will be used. The option is a: <code>org.apache.camel.component.http.HttpClientConfigurer</code> type. Group: advanced- Parameters:
httpClientConfigurer
- the value to set- Returns:
- the dsl builder
-
httpConfiguration
default HttpComponentBuilderFactory.HttpComponentBuilder httpConfiguration(org.apache.camel.http.common.HttpConfiguration httpConfiguration) To use the shared HttpConfiguration as base configuration. The option is a: <code>org.apache.camel.http.common.HttpConfiguration</code> type. Group: advanced- Parameters:
httpConfiguration
- the value to set- Returns:
- the dsl builder
-
httpContext
default HttpComponentBuilderFactory.HttpComponentBuilder httpContext(org.apache.hc.core5.http.protocol.HttpContext httpContext) To use a custom org.apache.hc.core5.http.protocol.HttpContext when executing requests. The option is a: <code>org.apache.hc.core5.http.protocol.HttpContext</code> type. Group: advanced- Parameters:
httpContext
- the value to set- Returns:
- the dsl builder
-
maxTotalConnections
default HttpComponentBuilderFactory.HttpComponentBuilder maxTotalConnections(int maxTotalConnections) The maximum number of connections. The option is a: <code>int</code> type. Default: 200 Group: advanced- Parameters:
maxTotalConnections
- the value to set- Returns:
- the dsl builder
-
redirectHandlingDisabled
default HttpComponentBuilderFactory.HttpComponentBuilder redirectHandlingDisabled(boolean redirectHandlingDisabled) Disables automatic redirect handling. The option is a: <code>boolean</code> type. Default: false Group: advanced- Parameters:
redirectHandlingDisabled
- the value to set- Returns:
- the dsl builder
-
headerFilterStrategy
default HttpComponentBuilderFactory.HttpComponentBuilder headerFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy) To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message. The option is a: <code>org.apache.camel.spi.HeaderFilterStrategy</code> type. Group: filter- Parameters:
headerFilterStrategy
- the value to set- Returns:
- the dsl builder
-
proxyAuthDomain
Proxy authentication domain to use. The option is a: <code>java.lang.String</code> type. Group: proxy- Parameters:
proxyAuthDomain
- the value to set- Returns:
- the dsl builder
-
proxyAuthHost
Proxy authentication host. The option is a: <code>java.lang.String</code> type. Group: proxy- Parameters:
proxyAuthHost
- the value to set- Returns:
- the dsl builder
-
proxyAuthMethod
Proxy authentication method to use. The option is a: <code>java.lang.String</code> type. Group: proxy- Parameters:
proxyAuthMethod
- the value to set- Returns:
- the dsl builder
-
proxyAuthNtHost
Proxy authentication domain (workstation name) to use with NTML. The option is a: <code>java.lang.String</code> type. Group: proxy- Parameters:
proxyAuthNtHost
- the value to set- Returns:
- the dsl builder
-
proxyAuthPassword
default HttpComponentBuilderFactory.HttpComponentBuilder proxyAuthPassword(String proxyAuthPassword) Proxy authentication password. The option is a: <code>java.lang.String</code> type. Group: proxy- Parameters:
proxyAuthPassword
- the value to set- Returns:
- the dsl builder
-
proxyAuthPort
Proxy authentication port. The option is a: <code>java.lang.Integer</code> type. Group: proxy- Parameters:
proxyAuthPort
- the value to set- Returns:
- the dsl builder
-
proxyAuthScheme
Proxy authentication protocol scheme. The option is a: <code>java.lang.String</code> type. Group: proxy- Parameters:
proxyAuthScheme
- the value to set- Returns:
- the dsl builder
-
proxyAuthUsername
default HttpComponentBuilderFactory.HttpComponentBuilder proxyAuthUsername(String proxyAuthUsername) Proxy authentication username. The option is a: <code>java.lang.String</code> type. Group: proxy- Parameters:
proxyAuthUsername
- the value to set- Returns:
- the dsl builder
-
sslContextParameters
default HttpComponentBuilderFactory.HttpComponentBuilder sslContextParameters(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters) 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. The option is a: <code>org.apache.camel.support.jsse.SSLContextParameters</code> type. Group: security- Parameters:
sslContextParameters
- the value to set- Returns:
- the dsl builder
-
useGlobalSslContextParameters
default HttpComponentBuilderFactory.HttpComponentBuilder useGlobalSslContextParameters(boolean useGlobalSslContextParameters) Enable usage of global SSL context parameters. The option is a: <code>boolean</code> type. Default: false Group: security- Parameters:
useGlobalSslContextParameters
- the value to set- Returns:
- the dsl builder
-
x509HostnameVerifier
default HttpComponentBuilderFactory.HttpComponentBuilder x509HostnameVerifier(HostnameVerifier x509HostnameVerifier) To use a custom X509HostnameVerifier such as DefaultHostnameVerifier or NoopHostnameVerifier. The option is a: <code>javax.net.ssl.HostnameVerifier</code> type. Group: security- Parameters:
x509HostnameVerifier
- the value to set- Returns:
- the dsl builder
-
connectionRequestTimeout
default HttpComponentBuilderFactory.HttpComponentBuilder connectionRequestTimeout(org.apache.hc.core5.util.Timeout connectionRequestTimeout) Returns the connection lease request timeout used when requesting a connection from the connection manager. A timeout value of zero is interpreted as a disabled timeout. The option is a: <code>org.apache.hc.core5.util.Timeout</code> type. Default: 3 minutes Group: timeout- Parameters:
connectionRequestTimeout
- the value to set- Returns:
- the dsl builder
-
connectTimeout
default HttpComponentBuilderFactory.HttpComponentBuilder connectTimeout(org.apache.hc.core5.util.Timeout connectTimeout) Determines the timeout until a new connection is fully established. A timeout value of zero is interpreted as an infinite timeout. The option is a: <code>org.apache.hc.core5.util.Timeout</code> type. Default: 3 minutes Group: timeout- Parameters:
connectTimeout
- the value to set- Returns:
- the dsl builder
-
responseTimeout
default HttpComponentBuilderFactory.HttpComponentBuilder responseTimeout(org.apache.hc.core5.util.Timeout responseTimeout) Determines the timeout until arrival of a response from the opposite endpoint. A timeout value of zero is interpreted as an infinite timeout. Please note that response timeout may be unsupported by HTTP transports with message multiplexing. The option is a: <code>org.apache.hc.core5.util.Timeout</code> type. Default: 0 Group: timeout- Parameters:
responseTimeout
- the value to set- Returns:
- the dsl builder
-
soTimeout
default HttpComponentBuilderFactory.HttpComponentBuilder soTimeout(org.apache.hc.core5.util.Timeout soTimeout) Determines the default socket timeout value for blocking I/O operations. The option is a: <code>org.apache.hc.core5.util.Timeout</code> type. Default: 3 minutes Group: timeout- Parameters:
soTimeout
- the value to set- Returns:
- the dsl builder
-