@UriEndpoint(scheme="ahc",
title="AHC",
syntax="ahc:httpUri",
producerOnly=true,
label="http")
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() |
AhcComponent |
getComponent() |
org.apache.camel.spi.HeaderFilterStrategy |
getHeaderFilterStrategy() |
URI |
getHttpUri() |
org.apache.camel.util.jsse.SSLContextParameters |
getSslContextParameters() |
boolean |
isBridgeEndpoint() |
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 |
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, getExchangePattern, getId, getPollingConsumerQueueSize, hashCode, isPollingConsumerBlockWhenFull, isSynchronous, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toStringdoResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendpublic AhcEndpoint(String endpointUri, AhcComponent component, URI httpUri)
public AhcComponent getComponent()
getComponent in class org.apache.camel.impl.DefaultEndpointpublic org.apache.camel.Producer createProducer()
throws Exception
createProducer in interface org.apache.camel.EndpointExceptionpublic org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor)
throws Exception
createConsumer in interface org.apache.camel.EndpointExceptionpublic boolean isLenientProperties()
isLenientProperties in interface org.apache.camel.EndpointisLenientProperties in class org.apache.camel.impl.DefaultEndpointpublic boolean isSingleton()
isSingleton in interface org.apache.camel.IsSingletonpublic com.ning.http.client.AsyncHttpClient getClient()
public void setClient(com.ning.http.client.AsyncHttpClient client)
AsyncHttpClientpublic 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.HeaderFilterStrategyAwarepublic void setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
setHeaderFilterStrategy in interface org.apache.camel.spi.HeaderFilterStrategyAwarepublic 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)
protected void doStart()
throws Exception
doStart in class org.apache.camel.impl.DefaultEndpointExceptionprotected com.ning.http.client.AsyncHttpClient createClient(com.ning.http.client.AsyncHttpClientConfig config)
Apache Camel