Class DefaultVertxHttpBinding
java.lang.Object
org.apache.camel.component.vertx.http.DefaultVertxHttpBinding
- All Implemented Interfaces:
VertxHttpBinding
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleResponse(VertxHttpEndpoint endpoint, org.apache.camel.Exchange exchange, io.vertx.core.AsyncResult<io.vertx.ext.web.client.HttpResponse<io.vertx.core.buffer.Buffer>> response) Handles theHttpResponsereturned from the HTTP endpoint invocationhandleResponseFailure(VertxHttpEndpoint endpoint, org.apache.camel.Exchange exchange, io.vertx.ext.web.client.HttpResponse<io.vertx.core.buffer.Buffer> result) Handles failures returned in theHttpResponsevoidpopulateRequestHeaders(org.apache.camel.Exchange exchange, io.vertx.ext.web.client.HttpRequest<io.vertx.core.buffer.Buffer> request, org.apache.camel.spi.HeaderFilterStrategy strategy) Populates request headers on theHttpRequestusing the suppliedHeaderFilterStrategyvoidpopulateResponseHeaders(org.apache.camel.Exchange exchange, io.vertx.ext.web.client.HttpResponse<io.vertx.core.buffer.Buffer> response, org.apache.camel.spi.HeaderFilterStrategy strategy) Populates response headers on the exchange from theHttpResponseusing the suppliedHeaderFilterStrategyio.vertx.ext.web.client.HttpRequest<io.vertx.core.buffer.Buffer>prepareHttpRequest(VertxHttpEndpoint endpoint, org.apache.camel.Exchange exchange) Prepares aHttpRequestby setting up the required host, port & part details specified on the endpoint configurationprocessResponseBody(VertxHttpEndpoint endpoint, org.apache.camel.Exchange exchange, io.vertx.ext.web.client.HttpResponse<io.vertx.core.buffer.Buffer> result) processResponseBody(VertxHttpEndpoint endpoint, org.apache.camel.Exchange exchange, io.vertx.ext.web.client.HttpResponse<io.vertx.core.buffer.Buffer> result, boolean exceptionOnly) Processes the receivedBufferresponse body in theHttpResponse
-
Constructor Details
-
DefaultVertxHttpBinding
public DefaultVertxHttpBinding()
-
-
Method Details
-
prepareHttpRequest
public io.vertx.ext.web.client.HttpRequest<io.vertx.core.buffer.Buffer> prepareHttpRequest(VertxHttpEndpoint endpoint, org.apache.camel.Exchange exchange) throws Exception Description copied from interface:VertxHttpBindingPrepares aHttpRequestby setting up the required host, port & part details specified on the endpoint configuration- Specified by:
prepareHttpRequestin interfaceVertxHttpBinding- Throws:
Exception
-
populateRequestHeaders
public void populateRequestHeaders(org.apache.camel.Exchange exchange, io.vertx.ext.web.client.HttpRequest<io.vertx.core.buffer.Buffer> request, org.apache.camel.spi.HeaderFilterStrategy strategy) Description copied from interface:VertxHttpBindingPopulates request headers on theHttpRequestusing the suppliedHeaderFilterStrategy- Specified by:
populateRequestHeadersin interfaceVertxHttpBinding
-
handleResponse
public void handleResponse(VertxHttpEndpoint endpoint, org.apache.camel.Exchange exchange, io.vertx.core.AsyncResult<io.vertx.ext.web.client.HttpResponse<io.vertx.core.buffer.Buffer>> response) throws Exception Description copied from interface:VertxHttpBindingHandles theHttpResponsereturned from the HTTP endpoint invocation- Specified by:
handleResponsein interfaceVertxHttpBinding- Throws:
Exception
-
populateResponseHeaders
public void populateResponseHeaders(org.apache.camel.Exchange exchange, io.vertx.ext.web.client.HttpResponse<io.vertx.core.buffer.Buffer> response, org.apache.camel.spi.HeaderFilterStrategy strategy) Description copied from interface:VertxHttpBindingPopulates response headers on the exchange from theHttpResponseusing the suppliedHeaderFilterStrategy- Specified by:
populateResponseHeadersin interfaceVertxHttpBinding
-
processResponseBody
public Object processResponseBody(VertxHttpEndpoint endpoint, org.apache.camel.Exchange exchange, io.vertx.ext.web.client.HttpResponse<io.vertx.core.buffer.Buffer> result, boolean exceptionOnly) throws Exception Description copied from interface:VertxHttpBindingProcesses the receivedBufferresponse body in theHttpResponse- Specified by:
processResponseBodyin interfaceVertxHttpBinding- Throws:
Exception
-
processResponseBody
public Object processResponseBody(VertxHttpEndpoint endpoint, org.apache.camel.Exchange exchange, io.vertx.ext.web.client.HttpResponse<io.vertx.core.buffer.Buffer> result) throws Exception - Throws:
Exception
-
handleResponseFailure
public Throwable handleResponseFailure(VertxHttpEndpoint endpoint, org.apache.camel.Exchange exchange, io.vertx.ext.web.client.HttpResponse<io.vertx.core.buffer.Buffer> result) throws Exception Description copied from interface:VertxHttpBindingHandles failures returned in theHttpResponse- Specified by:
handleResponseFailurein interfaceVertxHttpBinding- Throws:
Exception
-