@UriEndpoint(firstVersion="2.3.0",
scheme="http,https",
title="HTTP,HTTPS",
syntax="http:httpUri",
producerOnly=true,
label="http",
lenientProperties=true)
@ManagedResource(description="Managed HttpEndpoint")
public class HttpEndpoint
extends org.apache.camel.http.common.HttpCommonEndpoint
Modifier and Type | Field and Description |
---|---|
protected org.apache.camel.support.jsse.SSLContextParameters |
sslContextParameters |
Constructor and Description |
---|
HttpEndpoint() |
HttpEndpoint(String endPointURI,
HttpComponent component,
org.apache.http.impl.client.HttpClientBuilder clientBuilder,
org.apache.http.conn.HttpClientConnectionManager clientConnectionManager,
HttpClientConfigurer clientConfigurer) |
HttpEndpoint(String endPointURI,
HttpComponent component,
URI httpURI) |
HttpEndpoint(String endPointURI,
HttpComponent component,
URI httpURI,
org.apache.http.impl.client.HttpClientBuilder clientBuilder,
org.apache.http.conn.HttpClientConnectionManager clientConnectionManager,
HttpClientConfigurer clientConfigurer) |
HttpEndpoint(String endPointURI,
HttpComponent component,
URI httpURI,
org.apache.http.conn.HttpClientConnectionManager clientConnectionManager) |
Modifier and Type | Method and Description |
---|---|
org.apache.camel.Consumer |
createConsumer(org.apache.camel.Processor processor) |
protected org.apache.http.client.HttpClient |
createHttpClient()
Factory method to create a new
HttpClient instance
Producers and consumers should use the getHttpClient() method instead. |
org.apache.camel.PollingConsumer |
createPollingConsumer() |
org.apache.camel.Producer |
createProducer() |
protected void |
doStop() |
org.apache.http.impl.client.HttpClientBuilder |
getClientBuilder() |
org.apache.http.conn.HttpClientConnectionManager |
getClientConnectionManager() |
int |
getClientConnectionsPoolStatsAvailable() |
int |
getClientConnectionsPoolStatsLeased() |
int |
getClientConnectionsPoolStatsMax() |
int |
getClientConnectionsPoolStatsPending() |
HttpComponent |
getComponent() |
int |
getConnectionRequestTimeout() |
int |
getConnectionsPerRoute() |
int |
getConnectTimeout() |
org.apache.http.client.CookieStore |
getCookieStore() |
org.apache.http.client.HttpClient |
getHttpClient() |
HttpClientConfigurer |
getHttpClientConfigurer() |
Map<String,Object> |
getHttpClientOptions() |
org.apache.http.protocol.HttpContext |
getHttpContext() |
int |
getMaxTotalConnections() |
int |
getSocketTimeout() |
org.apache.camel.support.jsse.SSLContextParameters |
getSslContextParameters() |
HostnameVerifier |
getX509HostnameVerifier() |
boolean |
isAuthenticationPreemptive() |
boolean |
isClearExpiredCookies() |
boolean |
isDeleteWithBody() |
boolean |
isGetWithBody() |
boolean |
isUseSystemProperties() |
void |
setAuthenticationPreemptive(boolean authenticationPreemptive)
If this option is true, camel-http sends preemptive basic authentication to the server.
|
void |
setClearExpiredCookies(boolean clearExpiredCookies)
Whether to clear expired cookies before sending the HTTP request.
|
void |
setClientBuilder(org.apache.http.impl.client.HttpClientBuilder clientBuilder)
Provide access to the http client request parameters used on new
RequestConfig instances
used by producers or consumers of this endpoint. |
void |
setClientConnectionManager(org.apache.http.conn.HttpClientConnectionManager clientConnectionManager)
To use a custom HttpClientConnectionManager to manage connections
|
void |
setConnectionRequestTimeout(int connectionRequestTimeout)
The timeout in milliseconds used when requesting a connection
from the connection manager.
|
void |
setConnectionsPerRoute(int connectionsPerRoute)
The maximum number of connections per route.
|
void |
setConnectTimeout(int connectTimeout)
Determines the timeout in milliseconds until a connection is established.
|
void |
setCookieHandler(org.apache.camel.http.common.cookie.CookieHandler cookieHandler) |
void |
setCookieStore(org.apache.http.client.CookieStore cookieStore)
To use a custom CookieStore.
|
void |
setDeleteWithBody(boolean deleteWithBody)
Whether the HTTP DELETE should include the message body or not.
|
void |
setGetWithBody(boolean getWithBody)
Whether the HTTP GET should include the message body or not.
|
void |
setHttpClient(org.apache.http.client.HttpClient httpClient)
Sets a custom HttpClient to be used by the producer
|
void |
setHttpClientConfigurer(HttpClientConfigurer httpClientConfigurer)
Register a custom configuration strategy for new
HttpClient instances
created by producers or consumers such as to configure authentication mechanisms etc |
void |
setHttpClientOptions(Map<String,Object> httpClientOptions)
To configure the HttpClient using the key/values from the Map.
|
void |
setHttpContext(org.apache.http.protocol.HttpContext httpContext)
To use a custom HttpContext instance
|
void |
setMaxTotalConnections(int maxTotalConnections)
The maximum number of connections.
|
void |
setSocketTimeout(int socketTimeout)
Defines the socket timeout (
SO_TIMEOUT ) in milliseconds,
which is the timeout for waiting for data or, put differently,
a maximum period inactivity between two consecutive data packets). |
void |
setSslContextParameters(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters)
To configure security using SSLContextParameters.
|
void |
setUseSystemProperties(boolean useSystemProperties)
To use System Properties as fallback for configuration
|
void |
setX509HostnameVerifier(HostnameVerifier x509HostnameVerifier)
To use a custom X509HostnameVerifier such as
DefaultHostnameVerifier
or NoopHostnameVerifier . |
canConnect, connect, disconnect, getAuthDomain, getAuthHost, getAuthMethod, getAuthMethodPriority, getAuthPassword, getAuthUsername, getBinding, getCookieHandler, getHeaderFilterStrategy, getHttpBinding, getHttpMethod, getHttpMethodRestrict, getHttpUri, getOkStatusCodeRange, getPath, getPort, getProtocol, getProxyAuthDomain, getProxyAuthHost, getProxyAuthMethod, getProxyAuthPassword, getProxyAuthPort, getProxyAuthScheme, getProxyAuthUsername, getProxyHost, getProxyPort, getResponseBufferSize, getServiceProperties, isAsync, isBridgeEndpoint, isChunked, isConnectionClose, isCopyHeaders, isDisableStreamCache, isEagerCheckContentAvailable, isIgnoreResponseBody, isLenientProperties, isMapHttpMessageBody, isMapHttpMessageFormUrlEncodedBody, isMapHttpMessageHeaders, isMatchOnUriPrefix, isMuteException, isOptionsEnabled, isPreserveHostHeader, isThrowExceptionOnFailure, isTraceEnabled, isTransferException, setAsync, setAuthDomain, setAuthHost, setAuthMethod, setAuthMethodPriority, setAuthPassword, setAuthUsername, setBinding, setBridgeEndpoint, setChunked, setConnectionClose, setCopyHeaders, setDisableStreamCache, setEagerCheckContentAvailable, setHeaderFilterStrategy, setHttpBinding, setHttpMethod, setHttpMethodRestrict, setHttpUri, setIgnoreResponseBody, setMapHttpMessageBody, setMapHttpMessageFormUrlEncodedBody, setMapHttpMessageHeaders, setMatchOnUriPrefix, setMuteException, setOkStatusCodeRange, setOptionsEnabled, setPreserveHostHeader, setProxyAuthDomain, setProxyAuthHost, setProxyAuthMethod, setProxyAuthPassword, setProxyAuthPort, setProxyAuthScheme, setProxyAuthUsername, setProxyHost, setProxyPort, setResponseBufferSize, setThrowExceptionOnFailure, setTraceEnabled, setTransferException
configureConsumer, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, doInit, doStart, equals, getCamelContext, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBasicPropertyBinding, isBridgeErrorHandler, isLazyStartProducer, isPollingConsumerBlockWhenFull, isSingleton, isSynchronous, setBasicPropertyBinding, setBridgeErrorHandler, setCamelContext, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
build, doBuild, doResume, doShutdown, doSuspend, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
@UriParam(label="security", description="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.") protected org.apache.camel.support.jsse.SSLContextParameters sslContextParameters
public HttpEndpoint()
public HttpEndpoint(String endPointURI, HttpComponent component, URI httpURI) throws URISyntaxException
URISyntaxException
public HttpEndpoint(String endPointURI, HttpComponent component, URI httpURI, org.apache.http.conn.HttpClientConnectionManager clientConnectionManager) throws URISyntaxException
URISyntaxException
public HttpEndpoint(String endPointURI, HttpComponent component, org.apache.http.impl.client.HttpClientBuilder clientBuilder, org.apache.http.conn.HttpClientConnectionManager clientConnectionManager, HttpClientConfigurer clientConfigurer) throws URISyntaxException
URISyntaxException
public HttpEndpoint(String endPointURI, HttpComponent component, URI httpURI, org.apache.http.impl.client.HttpClientBuilder clientBuilder, org.apache.http.conn.HttpClientConnectionManager clientConnectionManager, HttpClientConfigurer clientConfigurer) throws URISyntaxException
URISyntaxException
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
Exception
public org.apache.camel.PollingConsumer createPollingConsumer() throws Exception
createPollingConsumer
in interface org.apache.camel.Endpoint
createPollingConsumer
in class org.apache.camel.support.DefaultEndpoint
Exception
public org.apache.http.client.HttpClient getHttpClient()
public void setHttpClient(org.apache.http.client.HttpClient httpClient)
protected org.apache.http.client.HttpClient createHttpClient()
HttpClient
instance
Producers and consumers should use the getHttpClient()
method instead.public HttpComponent getComponent()
getComponent
in class org.apache.camel.http.common.HttpCommonEndpoint
protected void doStop() throws Exception
doStop
in class org.apache.camel.support.DefaultEndpoint
Exception
public org.apache.http.impl.client.HttpClientBuilder getClientBuilder()
public void setClientBuilder(org.apache.http.impl.client.HttpClientBuilder clientBuilder)
RequestConfig
instances
used by producers or consumers of this endpoint.public HttpClientConfigurer getHttpClientConfigurer()
public void setHttpClientConfigurer(HttpClientConfigurer httpClientConfigurer)
HttpClient
instances
created by producers or consumers such as to configure authentication mechanisms etcpublic org.apache.http.protocol.HttpContext getHttpContext()
public void setHttpContext(org.apache.http.protocol.HttpContext httpContext)
public org.apache.http.conn.HttpClientConnectionManager getClientConnectionManager()
public void setClientConnectionManager(org.apache.http.conn.HttpClientConnectionManager clientConnectionManager)
public boolean isClearExpiredCookies()
public void setClearExpiredCookies(boolean clearExpiredCookies)
public boolean isDeleteWithBody()
public void setDeleteWithBody(boolean deleteWithBody)
public boolean isGetWithBody()
public void setGetWithBody(boolean getWithBody)
public org.apache.http.client.CookieStore getCookieStore()
public void setCookieStore(org.apache.http.client.CookieStore cookieStore)
public void setCookieHandler(org.apache.camel.http.common.cookie.CookieHandler cookieHandler)
setCookieHandler
in class org.apache.camel.http.common.HttpCommonEndpoint
public boolean isAuthenticationPreemptive()
public void setAuthenticationPreemptive(boolean authenticationPreemptive)
public void setHttpClientOptions(Map<String,Object> httpClientOptions)
public boolean isUseSystemProperties()
public void setUseSystemProperties(boolean useSystemProperties)
public int getMaxTotalConnections()
public void setMaxTotalConnections(int maxTotalConnections)
public int getConnectionsPerRoute()
public void setConnectionsPerRoute(int connectionsPerRoute)
public HostnameVerifier getX509HostnameVerifier()
public void setX509HostnameVerifier(HostnameVerifier x509HostnameVerifier)
DefaultHostnameVerifier
or NoopHostnameVerifier
.public org.apache.camel.support.jsse.SSLContextParameters getSslContextParameters()
public void setSslContextParameters(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters)
public int getConnectionRequestTimeout()
public void setConnectionRequestTimeout(int connectionRequestTimeout)
A timeout value of zero is interpreted as an infinite timeout. A negative value is interpreted as undefined (system default).
Default: -1
public int getConnectTimeout()
public void setConnectTimeout(int connectTimeout)
A timeout value of zero is interpreted as an infinite timeout. A negative value is interpreted as undefined (system default).
Default: -1
public int getSocketTimeout()
public void setSocketTimeout(int socketTimeout)
SO_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).
Default: -1
@ManagedAttribute(description="Maximum number of allowed persistent connections") public int getClientConnectionsPoolStatsMax()
@ManagedAttribute(description="Number of available idle persistent connections") public int getClientConnectionsPoolStatsAvailable()
@ManagedAttribute(description="Number of persistent connections tracked by the connection manager currently being used to execute requests") public int getClientConnectionsPoolStatsLeased()
@ManagedAttribute(description="Number of connection requests being blocked awaiting a free connection. This can happen only if there are more worker threads contending for fewer connections.") public int getClientConnectionsPoolStatsPending()
Apache Camel