Enum Class StartupPingMode
- All Implemented Interfaces:
Serializable,Comparable<StartupPingMode>,Constable
AlertEngine.start() finishes activating.
An ntfy alerting backend is silent by design — it only speaks when something goes wrong — so a
revoked token, a renamed topic or a blocked egress route all look identical at boot: nothing
happens. start() validates only what it can check locally (URL syntax, topic charset,
auth-pair completeness, timeouts) and never touches the network, so it cannot tell "correctly
configured" apart from "token revoked last week". This flag opts into an actual round-trip that
settles the question at deploy time instead of during the first real incident.
OFF is the default and is a true no-op: no request, and no diagnostic line either, so
the default path's diagnostic stream stays byte-identical to a build without this feature.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic StartupPingModeParses a configured value case-insensitively, returningnull— never throwing — when the value matches no constant.static StartupPingModeReturns the enum constant of this class with the specified name.static StartupPingMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
OFF
No self-test. Default; emits no request and no diagnostic. -
PROBE
Read-only reachability check —GET {url}/{topic}/json?poll=1&since=none. Validates DNS, TLS, that the endpoint really is an ntfy server, that the topic is addressable, and that the credentials are accepted for read. Publishes nothing, so subscribers see no noise.Known blind spot: ntfy ACLs separate read from write, so a read-only token (or one revoked for writes only) passes this check and still fails every real alert. On an open server, where reads are anonymous, a probe proves nothing at all about credentials.
PROBEanswers "can I reach this server?"; onlyPUBLISHanswers "will my alerts actually be delivered?". -
PUBLISH
Posts a real low-priority test notification through the production publish path, so the exact code, headers and credentials that carry real alerts are exercised. The cost is one notification per boot for every subscriber of the topic.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
fromValue
Parses a configured value case-insensitively, returningnull— never throwing — when the value matches no constant.nullrather than a silent fallback toOFFon purpose:ConfigLoaderand the adapters keep the default for a malformed value (matching how a bad int or duration is handled) but must still be able to tell "unset" from "misspelled" so a typo likestartup-ping=probis warned about instead of masquerading as a deliberateoff.
-