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:
java.lang.Runnable, AlarmListConnectionManager

public class AlarmListJ2eeConnectionManagerThread
extends java.lang.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.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 java.util.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()
          returns the threads current status states for status: CONNECTED = 0; DISCONNECTED = 1; STOP = 2;
 void init(PropertiesLoader props, java.util.Properties env)
          Initialises the ConnectionManagerThread
 void kill()
          Stops the ConnectionManagerThread
 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(java.lang.String _rebuilt_message)
          this method resets the alarm list in the AlarmMonitorBean and causes an alarmlist rebuilt event to be sent.
 void run()
          Starts the ConnectionManagerThread
 void send(java.util.Hashtable 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 java.util.Properties env
Constructor Detail

AlarmListJ2eeConnectionManagerThread

public AlarmListJ2eeConnectionManagerThread()
Method Detail

reset_list

public void reset_list(java.lang.String _rebuilt_message)
Description copied from interface: AlarmListConnectionManager
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(java.util.Hashtable alarmList)
Description copied from interface: AlarmListConnectionManager
Sends the AlarmList to the AlarmMonitorBean

Specified by:
send in interface AlarmListConnectionManager

run

public void run()
         throws java.lang.IllegalStateException
Description copied from interface: AlarmListConnectionManager
Starts the ConnectionManagerThread

Specified by:
run in interface java.lang.Runnable
Specified by:
run in interface AlarmListConnectionManager
Overrides:
run in class java.lang.Thread
Throws:
java.lang.IllegalStateException

init

public void init(PropertiesLoader props,
                 java.util.Properties env)
Description copied from interface: AlarmListConnectionManager
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()
Description copied from interface: AlarmListConnectionManager
Stops the ConnectionManagerThread

Specified by:
kill in interface AlarmListConnectionManager

getStatus

public int getStatus()
Description copied from interface: AlarmListConnectionManager
returns the threads current status states for status: CONNECTED = 0; DISCONNECTED = 1; STOP = 2;

Specified by:
getStatus in interface AlarmListConnectionManager

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

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

setapplicationcontext

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

Specified by:
setapplicationcontext in interface AlarmListConnectionManager
Parameters:
m_context - - application conext for this bean to use


Copyright ? 2006-2008. All Rights Reserved.