All Implemented Interfaces:
Notifier

public class WebexNotifier extends AbstractContentNotifier
`WebexNotifier` sends notifications via Webex API when instance events occur. It is part of the spring-boot-admin-server which is used for monitoring and managing Spring Boot applications.
  • Constructor Details

    • WebexNotifier

      public WebexNotifier(InstanceRepository repository, org.springframework.web.client.RestTemplate restTemplate)
      Creates a new WebexNotifier with the given repository and restTemplate.
      Parameters:
      repository - the instance repository responsible for storing instances
      restTemplate - the restTemplate used to make HTTP requests
  • Method Details

    • doNotify

      protected reactor.core.publisher.Mono<Void> doNotify(InstanceEvent event, Instance instance)
      Sends a notification with the given event and instance.
      Specified by:
      doNotify in class AbstractEventNotifier
      Parameters:
      event - the instance event to notify
      instance - the instance associated with the event
      Returns:
      a Mono representing the completion of the notification
      Throws:
      IllegalStateException - if 'authToken' is null
    • createMessage

      protected Object createMessage(InstanceEvent event, Instance instance)
      Creates a message object containing the parameters required for sending a notification.
      Parameters:
      event - the instance event for which the message is being created
      instance - the instance associated with the event
      Returns:
      a Map object containing the parameters for sending a notification
    • 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)
    • getUrl

      public URI getUrl()
    • setUrl

      public void setUrl(URI url)
    • getAuthToken

      public @Nullable String getAuthToken()
    • setAuthToken

      public void setAuthToken(@Nullable String authToken)
    • getRoomId

      public @Nullable String getRoomId()
    • setRoomId

      public void setRoomId(@Nullable String roomId)