Package com.intershop.gradle.icm.utils
Class SocketProbeSpec
-
- All Implemented Interfaces:
-
com.intershop.gradle.icm.utils.ProbeSpec,java.io.Serializable
public final class SocketProbeSpec implements ProbeSpec
Describes a SocketProbe.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classSocketProbeSpec.Companion
-
Field Summary
Fields Modifier and Type Field Description private final StringhostNameprivate final Integerportprivate final DurationretryIntervalprivate final DurationretryTimeoutpublic final static SocketProbeSpec.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description SocketProbeSpec(String hostName, Integer port, Duration retryInterval, Duration retryTimeout)
-
Method Summary
Modifier and Type Method Description final StringgetHostName()the host to connect to final IntegergetPort()the port to connect to DurationgetRetryInterval()interval between two attempts DurationgetRetryTimeout()total time after which probing is given up ProbecreateProbe(Logger logger, ProgressLoggerFactory progressLoggerFactory, Function1<Unit, Unit> onSuccess, Function1<Unit, Unit> onFailure)Creates the described Probe. -
-
Method Detail
-
getHostName
final String getHostName()
the host to connect to
-
getRetryInterval
Duration getRetryInterval()
interval between two attempts
-
getRetryTimeout
Duration getRetryTimeout()
total time after which probing is given up
-
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
-
-
-
-