Class DefaultVertxHttpBinding
java.lang.Object
org.apache.camel.component.vertx.http.DefaultVertxHttpBinding
- All Implemented Interfaces:
VertxHttpBinding
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
handleResponse
(VertxHttpEndpoint endpoint, org.apache.camel.Exchange exchange, io.vertx.core.AsyncResult<io.vertx.ext.web.client.HttpResponse<io.vertx.core.buffer.Buffer>> response) Handles theHttpResponse
returned 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 theHttpResponse
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) Populates request headers on theHttpRequest
using the suppliedHeaderFilterStrategy
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) Populates response headers on the exchange from theHttpResponse
using the suppliedHeaderFilterStrategy
io.vertx.ext.web.client.HttpRequest
<io.vertx.core.buffer.Buffer> prepareHttpRequest
(VertxHttpEndpoint endpoint, org.apache.camel.Exchange exchange) Prepares aHttpRequest
by setting up the required host, port invalid input: '&' 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 receivedBuffer
response 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:VertxHttpBinding
Prepares aHttpRequest
by setting up the required host, port invalid input: '&' part details specified on the endpoint configuration- Specified by:
prepareHttpRequest
in 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:VertxHttpBinding
Populates request headers on theHttpRequest
using the suppliedHeaderFilterStrategy
- Specified by:
populateRequestHeaders
in 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:VertxHttpBinding
Handles theHttpResponse
returned from the HTTP endpoint invocation- Specified by:
handleResponse
in 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:VertxHttpBinding
Populates response headers on the exchange from theHttpResponse
using the suppliedHeaderFilterStrategy
- Specified by:
populateResponseHeaders
in 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:VertxHttpBinding
Processes the receivedBuffer
response body in theHttpResponse
- Specified by:
processResponseBody
in 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:VertxHttpBinding
Handles failures returned in theHttpResponse
- Specified by:
handleResponseFailure
in interfaceVertxHttpBinding
- Throws:
Exception
-