@UriEndpoint(scheme="ahc",
title="AHC",
syntax="ahc:httpUri",
producerOnly=true,
label="http",
lenientProperties=true)
public class AhcEndpoint
extends org.apache.camel.impl.DefaultEndpoint
implements org.apache.camel.spi.HeaderFilterStrategyAware
Constructor and Description |
---|
AhcEndpoint(String endpointUri,
AhcComponent component,
URI httpUri) |
Modifier and Type | Method and Description |
---|---|
protected com.ning.http.client.AsyncHttpClient |
createClient(com.ning.http.client.AsyncHttpClientConfig config) |
org.apache.camel.Consumer |
createConsumer(org.apache.camel.Processor processor) |
org.apache.camel.Producer |
createProducer() |
protected void |
doStart() |
protected void |
doStop() |
AhcBinding |
getBinding() |
int |
getBufferSize() |
com.ning.http.client.AsyncHttpClient |
getClient() |
com.ning.http.client.AsyncHttpClientConfig |
getClientConfig() |
Map<String,Object> |
getClientConfigOptions() |
AhcComponent |
getComponent() |
org.apache.camel.spi.HeaderFilterStrategy |
getHeaderFilterStrategy() |
URI |
getHttpUri() |
org.apache.camel.util.jsse.SSLContextParameters |
getSslContextParameters() |
boolean |
isBridgeEndpoint() |
boolean |
isConnectionClose() |
boolean |
isLenientProperties() |
boolean |
isSingleton() |
boolean |
isThrowExceptionOnFailure() |
boolean |
isTransferException() |
void |
setBinding(AhcBinding binding)
To use a custom
AhcBinding which allows to control how to bind between AHC and Camel. |
void |
setBridgeEndpoint(boolean bridgeEndpoint)
If the option is true, then the Exchange.HTTP_URI header is ignored, and use the endpoint's URI for request.
|
void |
setBufferSize(int bufferSize)
The initial in-memory buffer size used when transferring data between Camel and AHC Client.
|
void |
setClient(com.ning.http.client.AsyncHttpClient client)
To use a custom
AsyncHttpClient |
void |
setClientConfig(com.ning.http.client.AsyncHttpClientConfig clientConfig)
To configure the AsyncHttpClient to use a custom com.ning.http.client.AsyncHttpClientConfig instance.
|
void |
setClientConfigOptions(Map<String,Object> clientConfigOptions)
To configure the AsyncHttpClientConfig using the key/values from the Map.
|
void |
setConnectionClose(boolean connectionClose)
Define if the Connection Close header has to be added to HTTP Request.
|
void |
setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
To use a custom HeaderFilterStrategy to filter header to and from Camel message.
|
void |
setHttpUri(URI httpUri)
The URI to use such as http://hostname:port/path
|
void |
setSslContextParameters(org.apache.camel.util.jsse.SSLContextParameters sslContextParameters)
Reference to a org.apache.camel.util.jsse.SSLContextParameters in the Registry.
|
void |
setThrowExceptionOnFailure(boolean throwExceptionOnFailure)
Option to disable throwing the AhcOperationFailedException in case of failed responses from the remote server.
|
void |
setTransferException(boolean transferException)
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 (for example using Jetty or Servlet Camel components).
|
configureConsumer, configurePollingConsumer, configureProperties, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, equals, getCamelContext, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBridgeErrorHandler, isPollingConsumerBlockWhenFull, isSynchronous, setBridgeErrorHandler, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public AhcEndpoint(String endpointUri, AhcComponent component, URI httpUri)
public AhcComponent getComponent()
getComponent
in class org.apache.camel.impl.DefaultEndpoint
public org.apache.camel.Producer createProducer() throws Exception
createProducer
in interface org.apache.camel.Endpoint
Exception
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
createConsumer
in interface org.apache.camel.Endpoint
Exception
public boolean isLenientProperties()
isLenientProperties
in interface org.apache.camel.Endpoint
isLenientProperties
in class org.apache.camel.impl.DefaultEndpoint
public boolean isSingleton()
isSingleton
in interface org.apache.camel.IsSingleton
public com.ning.http.client.AsyncHttpClient getClient()
public void setClient(com.ning.http.client.AsyncHttpClient client)
AsyncHttpClient
public com.ning.http.client.AsyncHttpClientConfig getClientConfig()
public void setClientConfig(com.ning.http.client.AsyncHttpClientConfig clientConfig)
public URI getHttpUri()
public void setHttpUri(URI httpUri)
public AhcBinding getBinding()
public void setBinding(AhcBinding binding)
AhcBinding
which allows to control how to bind between AHC and Camel.public org.apache.camel.spi.HeaderFilterStrategy getHeaderFilterStrategy()
getHeaderFilterStrategy
in interface org.apache.camel.spi.HeaderFilterStrategyAware
public void setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
setHeaderFilterStrategy
in interface org.apache.camel.spi.HeaderFilterStrategyAware
public boolean isBridgeEndpoint()
public void setBridgeEndpoint(boolean bridgeEndpoint)
public boolean isThrowExceptionOnFailure()
public void setThrowExceptionOnFailure(boolean throwExceptionOnFailure)
public boolean isTransferException()
public void setTransferException(boolean transferException)
public org.apache.camel.util.jsse.SSLContextParameters getSslContextParameters()
public void setSslContextParameters(org.apache.camel.util.jsse.SSLContextParameters sslContextParameters)
public int getBufferSize()
public void setBufferSize(int bufferSize)
public void setClientConfigOptions(Map<String,Object> clientConfigOptions)
public boolean isConnectionClose()
public void setConnectionClose(boolean connectionClose)
protected void doStart() throws Exception
doStart
in class org.apache.camel.impl.DefaultEndpoint
Exception
protected com.ning.http.client.AsyncHttpClient createClient(com.ning.http.client.AsyncHttpClientConfig config)
Apache Camel