Class NtfyProperties

java.lang.Object
io.github.pimak.ntfy.spring.NtfyProperties

@ConfigurationProperties(prefix="ntfy") public class NtfyProperties extends Object
Binds all ntfy.* application properties. Spring Boot's relaxed binding maps kebab-case (e.g. ntfy.app-name), camelCase and underscore variants onto these fields, and binds the Duration fields natively from strings like 5s, 3m, 500ms or a bare number interpreted as milliseconds.
  • Constructor Details

    • NtfyProperties

      public NtfyProperties()
  • Method Details

    • getUrl

      public String getUrl()
    • setUrl

      public void setUrl(String url)
    • getTopic

      public String getTopic()
    • setTopic

      public void setTopic(String topic)
    • getToken

      public String getToken()
    • setToken

      public void setToken(String token)
    • getUsername

      public String getUsername()
    • setUsername

      public void setUsername(String username)
    • getPassword

      public String getPassword()
    • setPassword

      public void setPassword(String password)
    • getTitle

      public String getTitle()
    • setTitle

      public void setTitle(String title)
    • getAppName

      public String getAppName()
    • setAppName

      public void setAppName(String appName)
    • getMaxStackFrames

      public int getMaxStackFrames()
    • setMaxStackFrames

      public void setMaxStackFrames(int maxStackFrames)
    • getConnectTimeout

      public Duration getConnectTimeout()
    • setConnectTimeout

      public void setConnectTimeout(Duration connectTimeout)
    • getRequestTimeout

      public Duration getRequestTimeout()
    • setRequestTimeout

      public void setRequestTimeout(Duration requestTimeout)
    • getMaxAlertsPerWindow

      public int getMaxAlertsPerWindow()
    • setMaxAlertsPerWindow

      public void setMaxAlertsPerWindow(int maxAlertsPerWindow)
    • getSuppressionWindow

      public Duration getSuppressionWindow()
    • setSuppressionWindow

      public void setSuppressionWindow(Duration suppressionWindow)
    • getErrorPriority

      public String getErrorPriority()
    • setErrorPriority

      public void setErrorPriority(String errorPriority)
    • getDigestPriority

      public String getDigestPriority()
    • setDigestPriority

      public void setDigestPriority(String digestPriority)
    • getErrorTags

      public String getErrorTags()
    • setErrorTags

      public void setErrorTags(String errorTags)
    • getDigestTags

      public String getDigestTags()
    • setDigestTags

      public void setDigestTags(String digestTags)
    • getWarnTopic

      public String getWarnTopic()
      The topic WARN-level events are published to. A non-blank value is the entire opt-in for WARN alerting: unset (the default), alerting stays ERROR-only. Set it to the same value as ntfy.topic to alert on warnings through the main topic at a different priority.
    • setWarnTopic

      public void setWarnTopic(String warnTopic)
    • getWarnPriority

      public String getWarnPriority()
      ntfy Priority header for WARN alerts and the WARN digest.
    • setWarnPriority

      public void setWarnPriority(String warnPriority)
    • getWarnTags

      public String getWarnTags()
      ntfy Tags header for WARN alerts and the WARN digest.
    • setWarnTags

      public void setWarnTags(String warnTags)
    • getClickUrl

      public String getClickUrl()
    • setClickUrl

      public void setClickUrl(String clickUrl)
    • getActions

      public String getActions()
    • setActions

      public void setActions(String actions)
    • getLocale

      public String getLocale()
      Language of notification bodies and diagnostics as a BCP 47 tag (e.g. fr, de-DE). Defaults to English; an unknown/unshipped locale silently uses English.
    • setLocale

      public void setLocale(String locale)
    • getExcludedLoggers

      public String getExcludedLoggers()
    • setExcludedLoggers

      public void setExcludedLoggers(String excludedLoggers)
    • getExcludedExceptionTypes

      public String getExcludedExceptionTypes()
    • setExcludedExceptionTypes

      public void setExcludedExceptionTypes(String excludedExceptionTypes)
    • isCache

      public boolean isCache()
    • setCache

      public void setCache(boolean cache)
    • isFirebase

      public boolean isFirebase()
    • setFirebase

      public void setFirebase(boolean firebase)
    • getIcon

      public String getIcon()
    • setIcon

      public void setIcon(String icon)
    • getIconsByLogger

      public String getIconsByLogger()
    • setIconsByLogger

      public void setIconsByLogger(String iconsByLogger)
    • getIncludeMdcKeys

      public String getIncludeMdcKeys()
      Comma-separated allow-list of MDC keys whose values are rendered into alert bodies, one key: value line each, in the order given here. Empty by default, and there is deliberately no wildcard form: an MDC value reaches a notification only when an operator named its key, because a production MDC routinely holds tokens and user identifiers that must never leave the process.
    • setIncludeMdcKeys

      public void setIncludeMdcKeys(String includeMdcKeys)
    • isEnabled

      public boolean isEnabled()
    • setEnabled

      public void setEnabled(boolean enabled)
    • isAsync

      public boolean isAsync()
    • setAsync

      public void setAsync(boolean async)
    • getAsyncQueueCapacity

      public int getAsyncQueueCapacity()
    • setAsyncQueueCapacity

      public void setAsyncQueueCapacity(int asyncQueueCapacity)
    • isRequireHttpsForCredentials

      public boolean isRequireHttpsForCredentials()
    • setRequireHttpsForCredentials

      public void setRequireHttpsForCredentials(boolean requireHttpsForCredentials)
    • getStartupPing

      public String getStartupPing()
    • setStartupPing

      public void setStartupPing(String startupPing)
      Bound as a String rather than the StartupPingMode enum on purpose: Spring's relaxed binder throws on an unconvertible enum value, which would turn one typo in application.yml into a failed context refresh. The core parses it leniently and warns instead, matching every other surface.
    • isStartupPingFailFast

      public boolean isStartupPingFailFast()
    • setStartupPingFailFast

      public void setStartupPingFailFast(boolean startupPingFailFast)
    • getStartupPingWarn

      public String getStartupPingWarn()
    • setStartupPingWarn

      public void setStartupPingWarn(String startupPingWarn)
      Bound as a String for the same reason as setStartupPing(String).
    • isStartupPingNotifyFailures

      public boolean isStartupPingNotifyFailures()
    • setStartupPingNotifyFailures

      public void setStartupPingNotifyFailures(boolean startupPingNotifyFailures)