public class Layer1ApiSoundAlertMessage extends java.lang.Object implements Layer1ApiStrategiesEchoMessagesLayer.StrategyEchoMessageFromLayer
Modifier and Type | Class and Description |
---|---|
static class |
Layer1ApiSoundAlertMessage.SoundAlertStatus |
static interface |
Layer1ApiSoundAlertMessage.SoundAlertStatusListener |
Modifier and Type | Field and Description |
---|---|
java.lang.String |
alertId
This ID can be used to reference alert later (stop it)
|
java.lang.Object |
metadata
This field will not be used anywhere outside of strategy code, but strategy can later use this field, for example, to determine if
this message should be cancelled in
Layer1ApiSoundAlertCancelMessage.Layer1ApiSoundMessagesFilter.shouldCancelMessage(Layer1ApiSoundAlertMessage) |
static long |
REPEAT_COUNT_INFINITE |
long |
repeatCount
Number of times sound will be repeated or
REPEAT_COUNT_INFINITE
for infinite replay (until cancelled by user). |
java.time.Duration |
repeatDelay
Delay between sound repetitions.
|
byte[] |
sound
Binary data for the sound to be played.
|
java.lang.Class<?> |
source
Class that created this message
|
Layer1ApiSoundAlertMessage.SoundAlertStatusListener |
statusListener |
java.lang.String |
textInfo
Text description of a message, will be displyed in alerts dialog
|
Constructor and Description |
---|
Layer1ApiSoundAlertMessage(byte[] sound,
java.lang.String textInfo,
long repeatCount,
java.time.Duration repeatDelay,
Layer1ApiSoundAlertMessage.SoundAlertStatusListener statusListener,
java.lang.Class<?> source,
java.lang.Object metadata)
Creates a message that will launch an alert
|
Layer1ApiSoundAlertMessage(java.lang.String alertId)
Creates a message that will stop an alert with specified alertId
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
toString() |
public static final long REPEAT_COUNT_INFINITE
public final byte[] sound
public final java.lang.String textInfo
public final long repeatCount
REPEAT_COUNT_INFINITE
for infinite replay (until cancelled by user).public final java.time.Duration repeatDelay
public final java.lang.String alertId
public final Layer1ApiSoundAlertMessage.SoundAlertStatusListener statusListener
public final java.lang.Class<?> source
public final java.lang.Object metadata
Layer1ApiSoundAlertCancelMessage.Layer1ApiSoundMessagesFilter.shouldCancelMessage(Layer1ApiSoundAlertMessage)
public Layer1ApiSoundAlertMessage(byte[] sound, java.lang.String textInfo, long repeatCount, java.time.Duration repeatDelay, Layer1ApiSoundAlertMessage.SoundAlertStatusListener statusListener, java.lang.Class<?> source, java.lang.Object metadata)
public Layer1ApiSoundAlertMessage(java.lang.String alertId)