Package com.intershop.gradle.icm.utils
Class HttpProbeSpec
-
- All Implemented Interfaces:
-
com.intershop.gradle.icm.utils.ProbeSpec,java.io.Serializable
public final class HttpProbeSpec implements ProbeSpec
Describes a HttpProbe.
-
-
Field Summary
Fields Modifier and Type Field Description private final URItargetprivate final DurationretryIntervalprivate final DurationretryTimeoutprivate final DurationrequestTimeout
-
Constructor Summary
Constructors Constructor Description HttpProbeSpec(URI target, Duration retryInterval, Duration retryTimeout, Duration requestTimeout)
-
Method Summary
Modifier and Type Method Description final URIgetTarget()the URI to request DurationgetRetryInterval()interval between two attempts DurationgetRetryTimeout()total time after which probing is given up final DurationgetRequestTimeout()timeout of a single HTTP request ProbecreateProbe(Logger logger, ProgressLoggerFactory progressLoggerFactory, Function1<Unit, Unit> onSuccess, Function1<Unit, Unit> onFailure)Creates the described Probe. -
-
Method Detail
-
getRetryInterval
Duration getRetryInterval()
interval between two attempts
-
getRetryTimeout
Duration getRetryTimeout()
total time after which probing is given up
-
getRequestTimeout
final Duration getRequestTimeout()
timeout of a single HTTP request
-
createProbe
Probe createProbe(Logger logger, ProgressLoggerFactory progressLoggerFactory, Function1<Unit, Unit> onSuccess, Function1<Unit, Unit> onFailure)
Creates the described Probe.
The callbacks are parameters rather than properties of the description on purpose: they are behaviour, they close over the state of the executing task and they are not Serializable, so keeping them in the description would make it unusable as a task input.
- Returns:
the probe to execute
-
-
-
-