Package velox.api.layer1.messages
Class Layer1ApiUserMessageNotification.Builder
java.lang.Object
velox.api.layer1.messages.Layer1ApiUserMessageNotification.Builder
- Enclosing class:
Layer1ApiUserMessageNotification
-
Method Summary
Modifier and TypeMethodDescriptionbuild()id(long id) isAdd(boolean isAdd) onMessageClosedCallback(Runnable onMessageClosedCallback)
-
Method Details
-
alias
- Parameters:
alias- target alias of message, or null if notification is for all aliases- Returns:
- this builder
-
text
- Parameters:
text- message text to display. Can be plain text or HTML. Line breaks in plain text can be specified using\n. When HTML is used,textmust be an HTML fragment: you do not need to wrap it into<html>and<body>tags. Hyperlinks are supported and rendered as clickable links. Example of HTML text message:"Message with <a href=\"https://example.com\">link</a>".- Returns:
- this builder
-
id
- Parameters:
id- unique id of message (useLayer1ApiUserMessageNotification.getNextId()to generate it first time)- Returns:
- this builder
-
isAdd
- Parameters:
isAdd- if true, message is displayed (if message with this id is already displayed - it will be updated) otherwise message with this id will be removed- Returns:
- this builder
-
onMessageClosedCallback
public Layer1ApiUserMessageNotification.Builder onMessageClosedCallback(Runnable onMessageClosedCallback) - Parameters:
onMessageClosedCallback- if not null, message will have cross icon, and callback will be called when it's pressed- Returns:
- this builder
-
type
- Parameters:
type- notification type that defines visual style and severity (INFO, WARNING, ERROR); if null,Layer1ApiUserMessageNotification.Type.INFOwill be used- Returns:
- this builder
-
build
-