Class HTTPRequestExecutor<R extends org.kie.kogito.jobs.service.api.Recipient<?>>
java.lang.Object
org.kie.kogito.job.recipient.common.http.HTTPRequestExecutor<R>
public abstract class HTTPRequestExecutor<R extends org.kie.kogito.jobs.service.api.Recipient<?>>
extends Object
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected io.vertx.mutiny.ext.web.client.WebClientprotected com.fasterxml.jackson.databind.ObjectMapperprotected longprotected io.vertx.mutiny.core.Vertx -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedHTTPRequestExecutor(long timeout, io.vertx.mutiny.core.Vertx vertx, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionprotected io.vertx.mutiny.core.buffer.BufferbuildBuffer(Object body) protected abstract HTTPRequestbuildRequest(R recipient, String limit) io.vertx.mutiny.ext.web.client.WebClientfacilitates tests.io.smallrye.mutiny.Uni<JobExecutionResponse>execute(JobDetails jobDetails) protected io.smallrye.mutiny.Uni<io.vertx.mutiny.ext.web.client.HttpResponse<io.vertx.mutiny.core.buffer.Buffer>>executeRequest(HTTPRequest request, long timeout) protected static <K,V> Map<K, V> filterEntries(Map<K, V> source) protected StringgetLimit(JobDetails job) protected abstract RgetRecipient(JobDetails job) protected intgetRepeatableJobCountDown(org.kie.kogito.timer.impl.IntervalTrigger trigger) protected intgetRepeatableJobCountDown(org.kie.kogito.timer.impl.SimpleTimerTrigger trigger) protected longprotected <T extends JobExecutionResponse>
io.smallrye.mutiny.Uni<T>handleError(T response) protected <T extends JobExecutionResponse>
io.smallrye.mutiny.Uni<T>handleResponse(T response) protected <T extends JobExecutionResponse>
io.smallrye.mutiny.Uni<T>handleSuccess(T response) protected void
-
Field Details
-
timeout
protected long timeout -
vertx
protected io.vertx.mutiny.core.Vertx vertx -
client
protected io.vertx.mutiny.ext.web.client.WebClient client -
objectMapper
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
-
Constructor Details
-
HTTPRequestExecutor
protected HTTPRequestExecutor() -
HTTPRequestExecutor
protected HTTPRequestExecutor(long timeout, io.vertx.mutiny.core.Vertx vertx, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
initialize
protected void initialize() -
createClient
public io.vertx.mutiny.ext.web.client.WebClient createClient()facilitates tests. -
execute
-
getRecipient
-
buildRequest
-
executeRequest
protected io.smallrye.mutiny.Uni<io.vertx.mutiny.ext.web.client.HttpResponse<io.vertx.mutiny.core.buffer.Buffer>> executeRequest(HTTPRequest request, long timeout) -
buildBuffer
-
handleResponse
-
handleError
-
handleSuccess
-
getLimit
-
getTimeoutInMillis
-
getRepeatableJobCountDown
protected int getRepeatableJobCountDown(org.kie.kogito.timer.impl.IntervalTrigger trigger) -
getRepeatableJobCountDown
protected int getRepeatableJobCountDown(org.kie.kogito.timer.impl.SimpleTimerTrigger trigger) -
filterEntries
-