public final class SOMAlerter extends Alerter.Abstract implements ServiceThread.Target
Implements an Alerter
using Simple Messaging Objects as
transport.
Alerter.Abstract, Alerter.Factory, Alerter.Listener, Alerter.SharedContext
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_TOPIC
Default alerter topic.
|
static String |
TOPIC_PROPERTIES
The topic properties.
|
Constructor and Description |
---|
SOMAlerter() |
Modifier and Type | Method and Description |
---|---|
protected void |
doSend(Alert alert)
Does send an alert.
|
protected boolean |
doSetUp()
Does set up the alerter.
|
protected void |
doStart()
Does start.
|
protected void |
doStop()
Does stop.
|
protected void |
doTearDown()
Does tear down what has been set up.
|
boolean |
isEmbedded()
Asks if this alerter is embedded.
|
boolean |
isRunning()
Asks if this alerter is running.
|
void |
run()
Runs.
|
protected Alerter.SharedContext |
sharedContext()
Returns the shared context.
|
addListener, getActiveInstance, getAlerterProperties, getConfig, getConfigProperties, getOwner, getService, getThisLogger, isShared, isStealth, notifyListeners, removeListener, send, setUp, start, stop, tearDown
public static final String DEFAULT_TOPIC
public static final String TOPIC_PROPERTIES
public boolean isEmbedded()
isEmbedded
in interface Alerter
isEmbedded
in class Alerter.Abstract
public boolean isRunning()
public void run()
Similar to same in Runnable but may throw exceptions.
run
in interface ServiceThread.Target
protected void doSend(Alert alert) throws InterruptedException, ServiceNotAvailableException
doSend
in class Alerter.Abstract
alert
- The alert.InterruptedException
- When the service is stopped.ServiceNotAvailableException
- When the service is not
available.protected boolean doSetUp()
doSetUp
in class Alerter.Abstract
protected void doStart() throws InterruptedException
doStart
in class Alerter.Abstract
InterruptedException
- When interrupted.protected void doStop()
doStop
in class Alerter.Abstract
protected void doTearDown()
doTearDown
in class Alerter.Abstract
protected Alerter.SharedContext sharedContext()
sharedContext
in class Alerter.Abstract
Copyright © 2003-2019 Serge Brisson. All Rights Reserved.