Class NtfyPublisher

java.lang.Object
io.github.pimak.ntfy.core.NtfyPublisher

public class NtfyPublisher extends Object
Stateless, never-throws HTTP publisher for the ntfy wire format.

Zero framework dependencies — this class is plain-constructed by AlertEngine/ NtfyClient, not managed by any DI container. It never calls an SLF4J logger and never posts to a Logback StatusManager; the caller owns all diagnostics and only consumes the returned PublishResult.

Internal transport. This class is public only because AlertEngine, NtfyClient and StartupSelfTest needed it before there was anywhere better to put it — not because it was designed as an entry point. It is NOT covered by this library's binary-compatibility guarantee, its shape is free to change within 2.x, and it is scheduled to stop being public in 3.0. Publish through NtfyClient instead, which is the supported surface for sending a notification of your own.

No SSRF guard is included here — that concern is out of scope for a plain HTTP publisher and is the consumer's responsibility if the target URL is derived from untrusted input. The topic, however, IS validated (ntfy's own [-_A-Za-z0-9]{1,64} rule): it is concatenated into the request path, and a topic containing /, ?, #, or .. would otherwise rewrite the request target (cross-topic publishing with the configured credential).