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

java.lang.Object
  extended by org.openoss.opennms.spring.qosd.ejb.AlarmListConnectionManagerJ2eeImpl
All Implemented Interfaces:
AlarmListConnectionManager

public class AlarmListConnectionManagerJ2eeImpl
extends java.lang.Object
implements AlarmListConnectionManager

This class provides an implimentation of a AlarmListConnectionManager which connects to an external AlarmMonitor bean in a J2ee container ( i.e. in Jboss ). It proxys the calls to the AlarmListJ2eeConnectionManagerThread which coes the actiual connection. This allows Spring wiring to be used to select this or nother class as the AlarmListConnectionManager in QosD


Field Summary
 
Fields inherited from interface org.openoss.opennms.spring.qosd.AlarmListConnectionManager
CONNECTED, DISCONNECTED, REBUILD, SEND, SENT, STOP
 
Constructor Summary
AlarmListConnectionManagerJ2eeImpl()
           
 
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
 void start()
          Causes the thread supporting the connection Manager to start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlarmListConnectionManagerJ2eeImpl

public AlarmListConnectionManagerJ2eeImpl()
Method Detail

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

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

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

run

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

Specified by:
run in interface AlarmListConnectionManager
Throws:
java.lang.IllegalStateException

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

start

public void start()
Causes the thread supporting the connection Manager to start

Specified by:
start 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 SPRING DAO SETTERS - NOT USED IN THIS VERSION


Copyright ? 2006-2008. All Rights Reserved.