Package org.apache.camel.component.http
Interface HttpActivityListener
- All Known Implementing Classes:
LoggingHttpActivityListener
public interface HttpActivityListener
Listener when HTTP requests and responses are sent and received.
-
Method Summary
Modifier and TypeMethodDescriptionvoidonRequestSubmitted(Object source, org.apache.camel.Exchange exchange, org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.HttpEntity entity) HTTP request is about to be sentvoidonResponseReceived(Object source, org.apache.camel.Exchange exchange, org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.HttpEntity entity, long elapsed) HTTP response received
-
Method Details
-
onRequestSubmitted
void onRequestSubmitted(Object source, org.apache.camel.Exchange exchange, org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.HttpEntity entity) HTTP request is about to be sent- Parameters:
source- the http producer that are usedexchange- the current exchangehost- the host where the request is sent torequest- the http requestentity- the http data
-
onResponseReceived
void onResponseReceived(Object source, org.apache.camel.Exchange exchange, org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.HttpEntity entity, long elapsed) HTTP response received- Parameters:
source- the http producer that are usedexchange- the current exchangehost- the host where the response was received fromresponse- the http responseentity- the http dataelapsed- time in millis before the response was received after sending
-