All Implemented Interfaces:
Notifier

public class WebexNotifier extends AbstractStatusChangeNotifier
`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
    • getText

      @Nullable protected String getText(InstanceEvent event, Instance instance)
      Retrieves the text for the given event and instance.
      Parameters:
      event - the instance event for which the text is being retrieved
      instance - the instance associated with the event
      Returns:
      the text for the event and instance, or null if not available
    • setRestTemplate

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

      public URI getUrl()
    • setUrl

      public void setUrl(URI url)
    • getAuthToken

      @Nullable public String getAuthToken()
    • setAuthToken

      public void setAuthToken(@Nullable String authToken)
    • getRoomId

      @Nullable public String getRoomId()
    • setRoomId

      public void setRoomId(@Nullable String roomId)
    • getMessage

      public org.springframework.expression.Expression getMessage()
    • setMessage

      public void setMessage(String message)