All Implemented Interfaces:
Notifier

public class TelegramNotifier extends AbstractContentNotifier
Notifier submitting events to Telegram.
  • Constructor Details

    • TelegramNotifier

      public TelegramNotifier(InstanceRepository repository, org.springframework.web.client.RestTemplate restTemplate)
  • Method Details

    • doNotify

      protected reactor.core.publisher.Mono<Void> doNotify(InstanceEvent event, Instance instance)
      Specified by:
      doNotify in class AbstractEventNotifier
    • buildUrl

      protected String buildUrl()
    • getDefaultMessage

      protected String getDefaultMessage()
      Description copied from class: AbstractContentNotifier
      Defines the default SpEL template string used for message generation.

      The template should use #{key} syntax to reference variables provided by AbstractContentNotifier.buildContentModel(InstanceEvent, Instance). This default can be overridden at runtime using AbstractContentNotifier.setMessage(String).

      Specified by:
      getDefaultMessage in class AbstractContentNotifier
      Returns:
      the default SpEL template string (e.g., "#{name} is #{status}")
    • setRestTemplate

      public void setRestTemplate(org.springframework.web.client.RestTemplate restTemplate)
    • getApiUrl

      public String getApiUrl()
    • setApiUrl

      public void setApiUrl(String apiUrl)
    • getChatId

      public @Nullable String getChatId()
    • setChatId

      public void setChatId(@Nullable String chatId)
    • getMessageThreadId

      public Integer getMessageThreadId()
    • setMessageThreadId

      public void setMessageThreadId(Integer messageThreadId)
    • getAuthToken

      public @Nullable String getAuthToken()
    • setAuthToken

      public void setAuthToken(@Nullable String authToken)
    • isDisableNotify

      public boolean isDisableNotify()
    • setDisableNotify

      public void setDisableNotify(boolean disableNotify)
    • getParseMode

      public String getParseMode()
    • setParseMode

      public void setParseMode(String parseMode)