Class WebexNotifier
java.lang.Object
de.codecentric.boot.admin.server.notify.AbstractEventNotifier
de.codecentric.boot.admin.server.notify.AbstractStatusChangeNotifier
de.codecentric.boot.admin.server.notify.WebexNotifier
- All Implemented Interfaces:
Notifier
`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 Summary
ConstructorsConstructorDescriptionWebexNotifier(InstanceRepository repository, org.springframework.web.client.RestTemplate restTemplate) Creates a new WebexNotifier with the given repository and restTemplate. -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectcreateMessage(InstanceEvent event, Instance instance) Creates a message object containing the parameters required for sending a notification.protected reactor.core.publisher.Mono<Void>doNotify(InstanceEvent event, Instance instance) Sends a notification with the given event and instance.org.springframework.expression.Expressionprotected StringgetText(InstanceEvent event, Instance instance) Retrieves the text for the given event and instance.getUrl()voidsetAuthToken(String authToken) voidsetMessage(String message) voidsetRestTemplate(org.springframework.web.client.RestTemplate restTemplate) voidvoidMethods inherited from class de.codecentric.boot.admin.server.notify.AbstractStatusChangeNotifier
getIgnoreChanges, getLastStatus, notify, setIgnoreChanges, shouldNotify, updateLastStatusMethods inherited from class de.codecentric.boot.admin.server.notify.AbstractEventNotifier
isEnabled, setEnabled
-
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 instancesrestTemplate- the restTemplate used to make HTTP requests
-
-
Method Details
-
doNotify
Sends a notification with the given event and instance.- Specified by:
doNotifyin classAbstractEventNotifier- Parameters:
event- the instance event to notifyinstance- the instance associated with the event- Returns:
- a Mono representing the completion of the notification
- Throws:
IllegalStateException- if 'authToken' is null
-
createMessage
Creates a message object containing the parameters required for sending a notification.- Parameters:
event- the instance event for which the message is being createdinstance- the instance associated with the event- Returns:
- a Map object containing the parameters for sending a notification
-
getText
Retrieves the text for the given event and instance.- Parameters:
event- the instance event for which the text is being retrievedinstance- 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
-
setUrl
-
getAuthToken
-
setAuthToken
-
getRoomId
-
setRoomId
-
getMessage
public org.springframework.expression.Expression getMessage() -
setMessage
-