Boolean.class, true);
Filter multipartFilter = resolveAndRemoveReferenceParameter(parameters, "multipartFilterRef", Filter.class);
List<Filter> filters = resolveAndRemoveReferenceListParameter(parameters, "filtersRef", Filter.class);
Long continuationTimeout = getAndRemoveParameter(parameters, "continuationTimeout", Long.class);
Boolean useContinuation = getAndRemoveParameter(parameters, "useContinuation", Boolean.class);
SSLContextParameters sslContextParameters = resolveAndRemoveReferenceParameter(parameters, "sslContextParametersRef", SSLContextParameters.class);
// configure http client if we have url configuration for it
// http client is only used for jetty http producer (hence not very commonly used)
HttpClient client = null;
if (IntrospectionSupport.hasProperties(parameters, "httpClient.") || sslContextParameters != null) {
client = getNewHttpClient();
if (IntrospectionSupport.hasProperties(parameters, "httpClient.")) {
if (isExplicitHttpClient) {
LOG.warn("The user explicitly set an HttpClient instance on the component, "
+ "but this endpoint provides HttpClient configuration. Are you sure that "
+ "this is what was intended? Applying endpoint configuration to a new HttpClient instance "
+ "to avoid altering existing HttpClient instances.");
}
// set additional parameters on http client
IntrospectionSupport.setProperties(client, parameters, "httpClient.");
// validate that we could resolve all httpClient. parameters as this component is lenient
validateParameters(uri, parameters, "httpClient.");
}
// Note that the component level instance is already configured in getNewHttpClient.
// We replace it here for endpoint level config.
if (sslContextParameters != null) {
if (isExplicitHttpClient) {
LOG.warn("The user explicitly set an HttpClient instance on the component, "
+ "but this endpoint provides SSLContextParameters configuration. Are you sure that "
+ "this is what was intended? Applying endpoint configuration to a new HttpClient instance "
+ "to avoid altering existing HttpClient instances.");
}
((CamelHttpClient) client).setSSLContext(sslContextParameters.createSSLContext());
}
} else {
// Either we use the default one created by the component or we are using
// one explicitly set by the end user, either way, we just use it as is.
client = getHttpClient();