|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.component.ahc.DefaultAhcBinding
public class DefaultAhcBinding
| Field Summary | |
|---|---|
protected org.slf4j.Logger |
log
|
| Constructor Summary | |
|---|---|
DefaultAhcBinding()
|
|
| Method Summary | |
|---|---|
protected String |
extractMethod(org.apache.camel.Exchange exchange)
|
void |
onComplete(AhcEndpoint endpoint,
org.apache.camel.Exchange exchange,
String url,
ByteArrayOutputStream os,
int contentLength,
int statusCode,
String statusText)
Callback from the AsyncHttpClient when complete and all the response has been received. |
void |
onHeadersReceived(AhcEndpoint endpoint,
org.apache.camel.Exchange exchange,
com.ning.http.client.HttpResponseHeaders headers)
Callback from the AsyncHttpClient when the HTTP headers was received |
void |
onStatusReceived(AhcEndpoint endpoint,
org.apache.camel.Exchange exchange,
com.ning.http.client.HttpResponseStatus responseStatus)
Callback from the AsyncHttpClient when the HTTP response status was received |
void |
onThrowable(AhcEndpoint endpoint,
org.apache.camel.Exchange exchange,
Throwable t)
Callback from the AsyncHttpClient when an exception occurred sending the request. |
protected void |
populateBody(com.ning.http.client.RequestBuilder builder,
AhcEndpoint endpoint,
org.apache.camel.Exchange exchange)
|
protected void |
populateHeaders(com.ning.http.client.RequestBuilder builder,
AhcEndpoint endpoint,
org.apache.camel.Exchange exchange)
|
com.ning.http.client.Request |
prepareRequest(AhcEndpoint endpoint,
org.apache.camel.Exchange exchange)
Prepares the AHC Request to be send. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final transient org.slf4j.Logger log
| Constructor Detail |
|---|
public DefaultAhcBinding()
| Method Detail |
|---|
public com.ning.http.client.Request prepareRequest(AhcEndpoint endpoint,
org.apache.camel.Exchange exchange)
throws org.apache.camel.CamelExchangeException
AhcBindingRequest to be send.
prepareRequest in interface AhcBindingendpoint - the endpointexchange - the exchange
AsyncHttpClient
org.apache.camel.CamelExchangeExceptionprotected String extractMethod(org.apache.camel.Exchange exchange)
protected void populateHeaders(com.ning.http.client.RequestBuilder builder,
AhcEndpoint endpoint,
org.apache.camel.Exchange exchange)
protected void populateBody(com.ning.http.client.RequestBuilder builder,
AhcEndpoint endpoint,
org.apache.camel.Exchange exchange)
throws org.apache.camel.CamelExchangeException
org.apache.camel.CamelExchangeException
public void onThrowable(AhcEndpoint endpoint,
org.apache.camel.Exchange exchange,
Throwable t)
throws Exception
AhcBindingAsyncHttpClient when an exception occurred sending the request.
onThrowable in interface AhcBindingendpoint - the endpointexchange - the exchanget - the thrown exception
Exception - is thrown if error occurred in the callback
public void onStatusReceived(AhcEndpoint endpoint,
org.apache.camel.Exchange exchange,
com.ning.http.client.HttpResponseStatus responseStatus)
throws Exception
AhcBindingAsyncHttpClient when the HTTP response status was received
onStatusReceived in interface AhcBindingendpoint - the endpointexchange - the exchangeresponseStatus - the HTTP response status
Exception - is thrown if error occurred in the callback
public void onHeadersReceived(AhcEndpoint endpoint,
org.apache.camel.Exchange exchange,
com.ning.http.client.HttpResponseHeaders headers)
throws Exception
AhcBindingAsyncHttpClient when the HTTP headers was received
onHeadersReceived in interface AhcBindingendpoint - the endpointexchange - the exchangeheaders - the HTTP headers
Exception - is thrown if error occurred in the callback
public void onComplete(AhcEndpoint endpoint,
org.apache.camel.Exchange exchange,
String url,
ByteArrayOutputStream os,
int contentLength,
int statusCode,
String statusText)
throws Exception
AhcBindingAsyncHttpClient when complete and all the response has been received.
onComplete in interface AhcBindingendpoint - the endpointexchange - the exchangeurl - the url requestedos - output stream with the HTTP response bodycontentLength - length of the response bodystatusCode - the http response codestatusText - the http status text
Exception - is thrown if error occurred in the callback
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||