Class RocketChatNotifier
java.lang.Object
de.codecentric.boot.admin.server.notify.AbstractEventNotifier
de.codecentric.boot.admin.server.notify.AbstractStatusChangeNotifier
de.codecentric.boot.admin.server.notify.filter.AbstractContentNotifier
de.codecentric.boot.admin.server.notify.RocketChatNotifier
- All Implemented Interfaces:
Notifier
Notifier submitting events to RocketChat.
- Author:
- Nicolas Badenne
-
Constructor Summary
ConstructorsConstructorDescriptionRocketChatNotifier(InstanceRepository repository, org.springframework.web.client.RestTemplate restTemplate) -
Method Summary
Modifier and TypeMethodDescriptionbuildContentModel(InstanceEvent event, Instance instance) Provides the data model used for evaluating the message template.protected ObjectcreateMessage(InstanceEvent event, Instance instance) protected reactor.core.publisher.Mono<Void>doNotify(InstanceEvent event, Instance instance) protected StringDefines the default SpEL template string used for message generation.@Nullable String@Nullable StringgetToken()@Nullable StringgetUrl()@Nullable StringvoidsetRestTemplate(org.springframework.web.client.RestTemplate restTemplate) voidvoidvoidvoidMethods inherited from class de.codecentric.boot.admin.server.notify.filter.AbstractContentNotifier
createContent, getMessage, setMessageMethods 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
-
RocketChatNotifier
public RocketChatNotifier(InstanceRepository repository, org.springframework.web.client.RestTemplate restTemplate)
-
-
Method Details
-
doNotify
- Specified by:
doNotifyin classAbstractEventNotifier
-
createMessage
-
buildContentModel
Description copied from class:AbstractContentNotifierProvides the data model used for evaluating the message template.The returned map contains key-value pairs that can be referenced in the SpEL template using #{key} syntax. For example, if the map contains {"name": "MyApp", "status": "UP"}, the template "#{name} is #{status}" would evaluate to "MyApp is UP".
- Overrides:
buildContentModelin classAbstractContentNotifier- Parameters:
event- the instance event containing event-specific datainstance- the instance containing registration and status information- Returns:
- a map of template variables and their values
-
getDefaultMessage
Description copied from class:AbstractContentNotifierDefines 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 usingAbstractContentNotifier.setMessage(String).- Specified by:
getDefaultMessagein classAbstractContentNotifier- Returns:
- the default SpEL template string (e.g., "#{name} is #{status}")
-
setRestTemplate
public void setRestTemplate(org.springframework.web.client.RestTemplate restTemplate) -
getUrl
-
setUrl
-
getRoomId
-
setRoomId
-
getToken
-
setToken
-
getUserId
-
setUserId
-