Class DefaultVertxHttpBinding
- java.lang.Object
-
- org.apache.camel.component.vertx.http.DefaultVertxHttpBinding
-
- All Implemented Interfaces:
VertxHttpBinding
public class DefaultVertxHttpBinding extends Object implements VertxHttpBinding
-
-
Constructor Summary
Constructors Constructor Description DefaultVertxHttpBinding()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandleResponse(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 invocationThrowablehandleResponseFailure(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 configurationObjectprocessResponseBody(VertxHttpEndpoint endpoint, org.apache.camel.Exchange exchange, io.vertx.ext.web.client.HttpResponse<io.vertx.core.buffer.Buffer> result)ObjectprocessResponseBody(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
-
-
-
Method Detail
-
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
-
-