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 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

Version:
$Id: $
Author:
ranger

Field Summary
 
Fields inherited from interface org.openoss.opennms.spring.qosd.AlarmListConnectionManager
CONNECTED, DISCONNECTED, REBUILD, SEND, SENT, STOP
 
Constructor Summary
AlarmListConnectionManagerJ2eeImpl()
          Constructor for AlarmListConnectionManagerJ2eeImpl.
 
Method Summary
 int getStatus()
          getStatus
 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
 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()

Constructor for AlarmListConnectionManagerJ2eeImpl.

Method Detail

getStatus

public int getStatus()

getStatus

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

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

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

run

public void run()
         throws IllegalStateException

run

Specified by:
run in interface AlarmListConnectionManager
Throws:
IllegalStateException - if any.

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.

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
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.