Class VertxHttpConfiguration
java.lang.Object
org.apache.camel.component.vertx.http.VertxHttpConfiguration
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintio.vertx.ext.web.client.spi.CookieStoreorg.apache.camel.spi.HeaderFilterStrategyio.vertx.core.http.HttpMethodio.vertx.core.net.ProxyTypeorg.apache.camel.support.jsse.SSLContextParametersTo configure security using SSLContextParameterslongio.vertx.ext.web.client.WebClientOptionsbooleanbooleanbooleanbooleanbooleanvoidsetBasicAuthPassword(String basicAuthPassword) The password to use for basic authenticationvoidsetBasicAuthUsername(String basicAuthUsername) The user name to use for basic authenticationvoidsetBearerToken(String bearerToken) The bearer token to use for bearer token authenticationvoidsetConnectTimeout(int connectTimeout) The amount of time in milliseconds until a connection is established.voidsetCookieStore(io.vertx.ext.web.client.spi.CookieStore cookieStore) A custom CookieStore to use when session management is enabled.voidsetHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy) A custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message.voidsetHttpMethod(io.vertx.core.http.HttpMethod httpMethod) The HTTP method to use.voidsetHttpUri(URI httpUri) The HTTP URI to connect tovoidsetOkStatusCodeRange(String okStatusCodeRange) The status codes which are considered a success response.voidsetProxyHost(String proxyHost) The proxy server host addressvoidsetProxyPassword(String proxyPassword) The proxy server password if authentication is requiredvoidsetProxyPort(Integer proxyPort) The proxy server portvoidsetProxyType(io.vertx.core.net.ProxyType proxyType) The proxy server typevoidsetProxyUsername(String proxyUsername) The proxy server username if authentication is requiredvoidsetResponsePayloadAsByteArray(boolean responsePayloadAsByteArray) Whether the response body should be byte[] or as io.vertx.core.buffer.BuffervoidsetSessionManagement(boolean sessionManagement) Enables session management via WebClientSession.voidsetSslContextParameters(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters) voidsetThrowExceptionOnFailure(boolean throwExceptionOnFailure) Disable throwing HttpOperationFailedException in case of failed responses from the remote servervoidsetTimeout(long timeout) The amount of time in milliseconds after which if the request does not return any data within the timeout period a TimeoutException fails the request.voidsetTransferException(boolean transferException) If enabled and an Exchange failed processing on the consumer side, and if the caused Exception was sent back serialized in the response as a application/x-java-serialized-object content type.voidsetUseCompression(boolean useCompression) Set whether compression is enabled to handled compressed (E.g gzipped) responsesvoidsetVertxHttpBinding(VertxHttpBinding vertxHttpBinding) A custom VertxHttpBinding which can control how to bind between Vert.x and Camel.voidsetWebClientOptions(io.vertx.ext.web.client.WebClientOptions webClientOptions) Sets customized options for configuring the Vert.x WebClient
-
Constructor Details
-
VertxHttpConfiguration
public VertxHttpConfiguration()
-
-
Method Details
-
setHttpUri
The HTTP URI to connect to -
getHttpUri
-
setHttpMethod
public void setHttpMethod(io.vertx.core.http.HttpMethod httpMethod) The HTTP method to use. The HttpMethod header cannot override this option if set -
getHttpMethod
public io.vertx.core.http.HttpMethod getHttpMethod() -
setTimeout
public void setTimeout(long timeout) The amount of time in milliseconds after which if the request does not return any data within the timeout period a TimeoutException fails the request. Setting zero or a negative value disables the timeout. -
getTimeout
public long getTimeout() -
setConnectTimeout
public void setConnectTimeout(int connectTimeout) The amount of time in milliseconds until a connection is established. A timeout value of zero is interpreted as an infinite timeout. -
getConnectTimeout
public int getConnectTimeout() -
setHeaderFilterStrategy
public void setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy) A custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message. -
getHeaderFilterStrategy
public org.apache.camel.spi.HeaderFilterStrategy getHeaderFilterStrategy() -
setVertxHttpBinding
A custom VertxHttpBinding which can control how to bind between Vert.x and Camel. -
getVertxHttpBinding
-
setThrowExceptionOnFailure
public void setThrowExceptionOnFailure(boolean throwExceptionOnFailure) Disable throwing HttpOperationFailedException in case of failed responses from the remote server -
isThrowExceptionOnFailure
public boolean isThrowExceptionOnFailure() -
setTransferException
public void setTransferException(boolean transferException) If enabled and an Exchange failed processing on the consumer side, and if the caused Exception was sent 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 HttpOperationFailedException. The caused exception is required to be serialized. This is by default turned off. If you enable this then be aware that Camel will deserialize the incoming data from the request to a Java object, which can be a potential security risk. -
isTransferException
public boolean isTransferException() -
setOkStatusCodeRange
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 -
getOkStatusCodeRange
-
setSessionManagement
public void setSessionManagement(boolean sessionManagement) Enables session management via WebClientSession. By default the client is configured to use an in-memory CookieStore. The cookieStore option can be used to override this -
isSessionManagement
public boolean isSessionManagement() -
setCookieStore
public void setCookieStore(io.vertx.ext.web.client.spi.CookieStore cookieStore) A custom CookieStore to use when session management is enabled. If this option is not set then an in-memory CookieStore is used -
getCookieStore
public io.vertx.ext.web.client.spi.CookieStore getCookieStore() -
setUseCompression
public void setUseCompression(boolean useCompression) Set whether compression is enabled to handled compressed (E.g gzipped) responses -
isUseCompression
public boolean isUseCompression() -
isResponsePayloadAsByteArray
public boolean isResponsePayloadAsByteArray() -
setResponsePayloadAsByteArray
public void setResponsePayloadAsByteArray(boolean responsePayloadAsByteArray) Whether the response body should be byte[] or as io.vertx.core.buffer.Buffer -
setBasicAuthUsername
The user name to use for basic authentication -
getBasicAuthUsername
-
setBasicAuthPassword
The password to use for basic authentication -
getBasicAuthPassword
-
setBearerToken
The bearer token to use for bearer token authentication -
getBearerToken
-
setProxyHost
The proxy server host address -
getProxyHost
-
setProxyPort
The proxy server port -
getProxyPort
-
setProxyUsername
The proxy server username if authentication is required -
getProxyUsername
-
setProxyPassword
The proxy server password if authentication is required -
getProxyPassword
-
setProxyType
public void setProxyType(io.vertx.core.net.ProxyType proxyType) The proxy server type -
getProxyType
public io.vertx.core.net.ProxyType getProxyType() -
setWebClientOptions
public void setWebClientOptions(io.vertx.ext.web.client.WebClientOptions webClientOptions) Sets customized options for configuring the Vert.x WebClient -
getWebClientOptions
public io.vertx.ext.web.client.WebClientOptions getWebClientOptions() -
getSslContextParameters
public org.apache.camel.support.jsse.SSLContextParameters getSslContextParameters()To configure security using SSLContextParameters -
setSslContextParameters
public void setSslContextParameters(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters)
-