|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opennms.netmgt.alarmd.api.support.AbstractNorthbounder
public abstract class AbstractNorthbounder
AbstractNorthBounder The purpose of this class is manage the queue of alarms that need to be forward and receive queries to/from a Southbound Interface. It passes Alarms on to the forwardAlarms method implemented by base classes in batches as they are added to the queue. The forwardAlarms method does the actual work of sending them to the Southbound Interface. preserve, accept and discard are called to add the Alarms to the queue as appropriate.
| Constructor Summary | |
|---|---|
protected |
AbstractNorthbounder(String name)
|
| Method Summary | |
|---|---|
protected abstract boolean |
accepts(NorthboundAlarm alarm)
|
NorthboundAlarm |
createSyncLostMessage()
|
protected void |
discard(NorthboundAlarm alarm)
|
abstract void |
forwardAlarms(List<NorthboundAlarm> alarms)
|
String |
getName()
|
void |
onAlarm(NorthboundAlarm alarm)
|
protected void |
onPostStart()
Override this to perform actions after startup. |
protected void |
onPreStart()
Override this to perform actions before startup. |
protected void |
onStop()
Override this to perform actions when stopping. |
protected void |
preserve(NorthboundAlarm alarm)
|
void |
run()
|
void |
setMaxBatchSize(int maxBatchSize)
|
void |
setMaxPreservedAlarms(int maxPreservedAlarms)
|
void |
setNaglesDelay(long delay)
|
void |
setRetryInterval(int retryInterval)
|
void |
start()
|
void |
stop()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractNorthbounder(String name)
| Method Detail |
|---|
public String getName()
public void setNaglesDelay(long delay)
public void setRetryInterval(int retryInterval)
public void setMaxBatchSize(int maxBatchSize)
public void setMaxPreservedAlarms(int maxPreservedAlarms)
protected void onPreStart()
protected void onPostStart()
public final void start()
throws NorthbounderException
start in interface NorthbounderNorthbounderException
public final void onAlarm(NorthboundAlarm alarm)
throws NorthbounderException
onAlarm in interface NorthbounderNorthbounderExceptionprotected abstract boolean accepts(NorthboundAlarm alarm)
protected void preserve(NorthboundAlarm alarm)
throws NorthbounderException
NorthbounderException
protected void discard(NorthboundAlarm alarm)
throws NorthbounderException
NorthbounderExceptionprotected void onStop()
public final void stop()
throws NorthbounderException
stop in interface NorthbounderNorthbounderExceptionpublic void run()
run in interface Runnablepublic NorthboundAlarm createSyncLostMessage()
createSyncLostMessage in interface StatusFactory<NorthboundAlarm>
public abstract void forwardAlarms(List<NorthboundAlarm> alarms)
throws NorthbounderException
NorthbounderException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||