NotificationsSender

org.eso.ias.sink.email.NotificationsSender
See theNotificationsSender companion object
class NotificationsSender(id: String, val sender: Sender) extends ValueListener

The NotificationsSender processes the alarms published in the BSDB and sends mails to registered recipients. One email is sent whenever an alarm becomes SET or CLEAR.

In addition another email is sent at regular time intervals to notify about the history of the alarm.

The sending of notification is delegated to the sender that allows to send notifications by different means (email logs, GSM,...) providing the proper implementations of the Sender trait.

Value parameters

id

identifier of the mail

sender

The sender of the notification

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def notifyAlarm(alarmId: String, state: AlarmSnapshot): Unit

Send the notification of the last alarm activation/deactivation

Send the notification of the last alarm activation/deactivation

Value parameters

alarmId

The ID of the alarm

state

the state of the alarm

Attributes

def sendDigests(): Unit

Periodically sends the notifications summary of the changes of the statss of all the monitored alarms.

Periodically sends the notifications summary of the changes of the statss of all the monitored alarms.

Attributes

Inherited methods

def isBroken: Boolean

Attributes

Returns

true if the processor is broken; false otherwise

Inherited from:
ValueListener
def markAsBroken(): Unit

Mark the listener as broken so the it is not run anymore

Mark the listener as broken so the it is not run anymore

One possibe use case is when the processor detects that the thread is too slow and decide not to run it again

Attributes

Inherited from:
ValueListener
final def processIasValues(iasValues: List[IASValue[_]]): String

A new set of IasValues has been received from the BSDB and needs to be processed

A new set of IasValues has been received from the BSDB and needs to be processed

Value parameters

iasValues

the values read from the BSDB

Attributes

Inherited from:
ValueListener
final def setUp(iasDao: IasDao, iasValues: Map[String, IasioDao]): String

Initialization

Initialization

Value parameters

iasDao

The configuration of the IAS read from the CDB

iasValues

The configuration of the IASIOs read from the CDB

Attributes

Inherited from:
ValueListener
final def tearDown(): String

Attributes

Inherited from:
ValueListener

Concrete fields

val alarmsForUser: Map[String, List[String]]

Maps each recipient with the alarms to notify: one user can be registered to be notified of several alarms The key is the address to send notifications to, the value is the list of alarms to notify to the recipient

Maps each recipient with the alarms to notify: one user can be registered to be notified of several alarms The key is the address to send notifications to, the value is the list of alarms to notify to the recipient

Attributes

val alarmsToTrack: Map[String, AlarmStateTracker]

The alarms that have a registered recipients to send notification.

The alarms that have a registered recipients to send notification.

Templated alarms are added as they arrive so this map contains an entry for the baseId of the identifier and one entry for each templated alarm

Attributes

val executor: ScheduledExecutorService

The executor to send notification: all the instances run in a single thread

The executor to send notification: all the instances run in a single thread

Attributes

val sender: Sender

The time interval (mins) to send notifications

The time interval (mins) to send notifications

Attributes

val timeTostart: (Int, Int)

Inherited fields

val closed: AtomicBoolean

The listener has been closed

The listener has been closed

Attributes

Inherited from:
ValueListener
val initialized: AtomicBoolean

The listener has been initialized

The listener has been initialized

Attributes

Inherited from:
ValueListener