Class NtfyClientProducer
java.lang.Object
io.github.pimak.ntfy.quarkus.runtime.NtfyClientProducer
Exposes a generic, application-scoped
NtfyClient for CDI injection, so Quarkus apps can
@Inject NtfyClient to send arbitrary notifications independent of the log-alert path.
The client is produced even for an inactive config: NtfyClient.notify(java.lang.String, java.lang.String) never throws and
simply returns a failure PublishResult when the endpoint is unset, which is friendlier
than failing bean resolution at startup for applications that only use the log-handler feature.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcloseNtfyClient(NtfyClient client) Releases the client's underlying HTTP resources when the application shuts down.ntfyClient(NtfyRuntimeConfig config) Produces the singletonNtfyClientbuilt from the run-time ntfy config.
-
Constructor Details
-
NtfyClientProducer
public NtfyClientProducer()
-
-
Method Details
-
ntfyClient
Produces the singletonNtfyClientbuilt from the run-time ntfy config. -
closeNtfyClient
Releases the client's underlying HTTP resources when the application shuts down.
-