org.openoss.opennms.spring.qosd.ejb
Class AlarmListJ2eeConnectionManagerThread

java.lang.Object
  extended by java.lang.Thread
      extended by org.openoss.opennms.spring.qosd.ejb.AlarmListJ2eeConnectionManagerThread
All Implemented Interfaces:
Runnable, AlarmListConnectionManager

public class AlarmListJ2eeConnectionManagerThread
extends Thread
implements AlarmListConnectionManager

The AlarmListJ2eeConnectionManagerThread tries to register with the AlarmMonitorBean and maintains the connection for the QosD. If the connection is lost, it reestablishes the connection.

Version:
$Id: $
Author:
ranger

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 Properties env
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Fields inherited from interface org.openoss.opennms.spring.qosd.AlarmListConnectionManager
CONNECTED, DISCONNECTED, REBUILD, SEND, SENT, STOP
 
Constructor Summary
AlarmListJ2eeConnectionManagerThread()
           
 
Method Summary
 int getStatus()
          Getter for the field status.
 void init(PropertiesLoader props, Properties env)
          Initialises the ConnectionManagerThread
 void kill()
          kill
 javax.oss.fm.monitor.AlarmValue makeAlarmValue()
          Makes a new empty alarm value object NOTE THIS IS A PATCH to proxy for JVTAlarmMonitorSession.makeAlarmValue()
 javax.oss.fm.monitor.AlarmValue makeAlarmValueFromSpec()
          Makes a new alarm value object pre-populated with internal objects which have been made from a local invarient specification.
 void reset_list(String _rebuilt_message)
          this method resets the alarm list in the AlarmMonitorBean and causes an alarmlist rebuilt event to be sent.
 void run()
          run
 void send(Hashtable<AlarmKey,AlarmValue> alarmList)
          Sends the AlarmList to the AlarmMonitorBean
 void setApplicationContext(org.springframework.context.support.ClassPathXmlApplicationContext m_context)
          Used by jmx mbean QoSD to pass in Spring Application context
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.openoss.opennms.spring.qosd.AlarmListConnectionManager
start
 

Field Detail

env

public Properties env
Constructor Detail

AlarmListJ2eeConnectionManagerThread

public AlarmListJ2eeConnectionManagerThread()
Method Detail

reset_list

public void reset_list(String _rebuilt_message)
this method resets the alarm list in the AlarmMonitorBean and causes an alarmlist rebuilt event to be sent.

Specified by:
reset_list in interface AlarmListConnectionManager
Parameters:
_rebuilt_message - message to include in the NotifyAlarmListRebuiltEvent

send

public void send(Hashtable<AlarmKey,AlarmValue> alarmList)
Sends the AlarmList to the AlarmMonitorBean

Specified by:
send in interface AlarmListConnectionManager
Parameters:
alarmList - a Hashtable object.

run

public void run()
         throws IllegalStateException

run

Specified by:
run in interface Runnable
Specified by:
run in interface AlarmListConnectionManager
Overrides:
run in class Thread
Throws:
IllegalStateException - if any.

init

public void init(PropertiesLoader props,
                 Properties env)
Initialises the ConnectionManagerThread

Specified by:
init in interface AlarmListConnectionManager
Parameters:
props - The PropertiesLoader method which reads the Qosd.properties file
env - the returned properties for setting up the connections to the AlarmMonitorBean

kill

public void kill()

kill

Specified by:
kill in interface AlarmListConnectionManager

getStatus

public int getStatus()

Getter for the field status.

Specified by:
getStatus in interface AlarmListConnectionManager
Returns:
a int.

makeAlarmValue

public javax.oss.fm.monitor.AlarmValue makeAlarmValue()
Makes a new empty alarm value object NOTE THIS IS A PATCH to proxy for JVTAlarmMonitorSession.makeAlarmValue()

Specified by:
makeAlarmValue in interface AlarmListConnectionManager
Returns:
a javax$oss$fm$monitor$AlarmValue object.

makeAlarmValueFromSpec

public javax.oss.fm.monitor.AlarmValue makeAlarmValueFromSpec()
Makes a new alarm value object pre-populated with internal objects which have been made from a local invarient specification. NOTE THIS IS A PATCH to proxy for JVTAlarmMonitorSession

Specified by:
makeAlarmValueFromSpec in interface AlarmListConnectionManager
Returns:
a javax$oss$fm$monitor$AlarmValue object.

setApplicationContext

public void setApplicationContext(org.springframework.context.support.ClassPathXmlApplicationContext m_context)
Used by jmx mbean QoSD to pass in Spring Application context Used by jmx mbean QoSD to pass in Spring Application context

Specified by:
setApplicationContext in interface AlarmListConnectionManager
Parameters:
m_context - - application context for this bean to use


Copyright © 2011. All Rights Reserved.