com::cosylab::acs::laser::LaserComponent Class Reference

Inheritance diagram for com::cosylab::acs::laser::LaserComponent:
Inheritance graph
[legend]
Collaboration diagram for com::cosylab::acs::laser::LaserComponent:
Collaboration graph
[legend]

List of all members.

Classes

class  LaserComponentTerminator

Public Member Functions

 LaserComponent (AlarmSystemCorbaServer corbaServer, AlarmSystemContainerServices alSysContSvcs) throws Exception
void initialize ()
synchronized void shutdown ()
void sentCoreAlarms (Vector< LaserCoreFaultCodes > alarms)
synchronized void onMessage (Message message)
void execute () throws ComponentLifecycleException
Alarm[] getActiveMultiplicityChildren (String parentId)
Alarm[] getActiveNodeChildren (String parentId)
Alarm getAlarmById (String id)
Alarm getAlarmByTriplet (String ff, String fm, int fc)
Alarm[] getAlarmsByCategory (int categoryId)
Alarm[] getAlarmsByPriority (int priority)
Alarm[] getAlarmsByResponsiblePerson (int responsibleId)
Alarm[] getAlarmsBySource (String sourceId)
Category[] getCategories ()
Category getCategoryByPath (String path)
Category[] getCategoryChildren (int nodeId)
Category getCategoryParent (int nodeId)
String getCategoryRootTopic ()
Category getCategoryTreeRoot ()
String getClientRootTopic ()
long getHeartbeatFrequency ()
String getHeartbeatTopic ()
Alarm[] getMultiplicityChildren (String parentId)
Alarm[] getMultiplicityParents (String childId)
int getMultiplicityThreshold (String parentId)
Alarm[] getNodeChildren (String parentId)
Alarm[] getNodeParents (String childId)
ResponsiblePerson[] getResponsiblePersons ()
String getSearchRootTopic ()
Source[] getSources ()
void archiveSearch (int[] categoryIds, String sql, String clientId)
void search (int[] categoryIds, String sql, String clientId)
void select (int[] categoryIds, String client) throws LaserProcessingException
String createAdminUser (String name, String password) throws alma.alarmsystem.LaserDefinitionException
String loginAdminUser (String name, String password)
void createCategory (String userId, alma.alarmsystem.CategoryDefinition definition) throws alma.alarmsystem.LaserDefinitionException
void createSource (String userId, alma.alarmsystem.SourceDefinition definition) throws alma.alarmsystem.LaserDefinitionException
void createAlarm (String userId, alma.alarmsystem.AlarmDefinition definition) throws alma.alarmsystem.LaserDefinitionException
boolean isACSAlarmService ()
synchronized void submitAlarm (Triplet triplet, boolean active, String sourceHostName, String sourceName, long timestamp, Property[] alarmProperties) throws BadParameterEx, UnexpectedExceptionEx

Package Attributes

Logger logger = null
ACSAdminUserDAOImpl adminUserDAO
ACSAlarmDAOImpl alarmDAO
ACSCategoryDAOImpl categoryDAO
ACSResponsiblePersonDAOImpl responsiblePersonDAO
ACSSourceDAOImpl sourceDAO
AdminUserDefinitionServiceImpl adminUserDefinitionService
AlarmCacheServerImpl alarmCacheServer
AlarmDefinitionServiceImpl alarmDefinitionService
AlarmMessageProcessorImpl alarmMessageProcessor
AlarmPublisherImpl alarmPublisher
AlarmSourceMonitorImpl alarmSourceMonitor
CategoryDefinitionServiceImpl categoryDefinitionService
CoreServiceImpl coreService
HeartbeatImpl heartbeat
MailAndSmsServerImpl mailAndSmsServer
SourceDefinitionServiceImpl sourceDefinitionService
AlarmCacheListener alarmCacheListener
ACSAlarmCacheImpl alarmCache
ACSJMSTopicConnectionFactory defaultTopicConnectionFactory

Private Member Functions

Alarm fromBusinessAlarm (cern.laser.business.data.Alarm alarm)
Alarm[] fromBusinessAlarmCollection (Collection alarms)
TextMessage buildMessage (cern.laser.source.alarmsysteminterface.impl.message.FaultState state, String hostName, String sourceName) throws Exception

Static Private Member Functions

static Category fromBusinessCategory (cern.laser.business.data.Category category)
static Category[] fromBusinessCategoryCollection (Collection categories)
static ResponsiblePerson fromBusinessResponsiblePerson (cern.laser.business.data.ResponsiblePerson person)
static Source fromBusinessSource (cern.laser.business.data.Source source)
static String getString (String str)

Private Attributes

Vector< LaserCoreFaultCodes > coreAlarms = new Vector<LaserCoreFaultCodes>()
final AlarmSystemCorbaServer corbaServer
final AlarmSystemContainerServices alSysContSvcs
volatile boolean closed = false

Constructor & Destructor Documentation

com::cosylab::acs::laser::LaserComponent::LaserComponent ( AlarmSystemCorbaServer  corbaServer,
AlarmSystemContainerServices  alSysContSvcs 
) throws Exception [inline]

Constructor

References alSysContSvcs, corbaServer, execute(), and initialize().


Member Function Documentation

void com::cosylab::acs::laser::LaserComponent::archiveSearch ( int[]  categoryIds,
String  sql,
String  clientId 
) [inline]
TextMessage com::cosylab::acs::laser::LaserComponent::buildMessage ( cern.laser.source.alarmsysteminterface.impl.message.FaultState  state,
String  hostName,
String  sourceName 
) throws Exception [inline, private]
String com::cosylab::acs::laser::LaserComponent::createAdminUser ( String  name,
String  password 
) throws alma.alarmsystem.LaserDefinitionException [inline]
void com::cosylab::acs::laser::LaserComponent::createAlarm ( String  userId,
alma.alarmsystem.AlarmDefinition  definition 
) throws alma.alarmsystem.LaserDefinitionException [inline]
void com::cosylab::acs::laser::LaserComponent::createCategory ( String  userId,
alma.alarmsystem.CategoryDefinition  definition 
) throws alma.alarmsystem.LaserDefinitionException [inline]
void com::cosylab::acs::laser::LaserComponent::createSource ( String  userId,
alma.alarmsystem.SourceDefinition  definition 
) throws alma.alarmsystem.LaserDefinitionException [inline]
void com::cosylab::acs::laser::LaserComponent::execute (  )  throws ComponentLifecycleException [inline]
Alarm com::cosylab::acs::laser::LaserComponent::fromBusinessAlarm ( cern.laser.business.data.Alarm  alarm  )  [inline, private]
Alarm [] com::cosylab::acs::laser::LaserComponent::fromBusinessAlarmCollection ( Collection  alarms  )  [inline, private]
static Category com::cosylab::acs::laser::LaserComponent::fromBusinessCategory ( cern.laser.business.data.Category  category  )  [inline, static, private]

Helper method which converts EJB business Category to CORBA Category structure.

Parameters:
category 
Returns:

Referenced by fromBusinessCategoryCollection(), getCategoryByPath(), getCategoryParent(), and getCategoryTreeRoot().

static Category [] com::cosylab::acs::laser::LaserComponent::fromBusinessCategoryCollection ( Collection  categories  )  [inline, static, private]

Helper method.

Parameters:
categories 
Returns:

References alma::alarmsystem::Category::Category(), and fromBusinessCategory().

Referenced by fromBusinessAlarm(), getCategories(), and getCategoryChildren().

static ResponsiblePerson com::cosylab::acs::laser::LaserComponent::fromBusinessResponsiblePerson ( cern.laser.business.data.ResponsiblePerson  person  )  [inline, static, private]

Helper method which converts EJB business ResponsiblePerson to CORBA ResponsiblePerson structure.

Parameters:
person 
Returns:

Referenced by fromBusinessAlarm(), fromBusinessSource(), and getResponsiblePersons().

static Source com::cosylab::acs::laser::LaserComponent::fromBusinessSource ( cern.laser.business.data.Source  source  )  [inline, static, private]

Helper method which converts EJB business Source to CORBA Source structure.

Parameters:
source 
Returns:

References fromBusinessResponsiblePerson().

Referenced by fromBusinessAlarm(), and getSources().

Alarm [] com::cosylab::acs::laser::LaserComponent::getActiveMultiplicityChildren ( String  parentId  )  [inline]
Alarm [] com::cosylab::acs::laser::LaserComponent::getActiveNodeChildren ( String  parentId  )  [inline]
Alarm com::cosylab::acs::laser::LaserComponent::getAlarmById ( String  id  )  [inline]
Alarm com::cosylab::acs::laser::LaserComponent::getAlarmByTriplet ( String  ff,
String  fm,
int  fc 
) [inline]
Alarm [] com::cosylab::acs::laser::LaserComponent::getAlarmsByCategory ( int  categoryId  )  [inline]
Alarm [] com::cosylab::acs::laser::LaserComponent::getAlarmsByPriority ( int  priority  )  [inline]
Alarm [] com::cosylab::acs::laser::LaserComponent::getAlarmsByResponsiblePerson ( int  responsibleId  )  [inline]
Alarm [] com::cosylab::acs::laser::LaserComponent::getAlarmsBySource ( String  sourceId  )  [inline]
Category [] com::cosylab::acs::laser::LaserComponent::getCategories (  )  [inline]
Category com::cosylab::acs::laser::LaserComponent::getCategoryByPath ( String  path  )  [inline]
Category [] com::cosylab::acs::laser::LaserComponent::getCategoryChildren ( int  nodeId  )  [inline]
Category com::cosylab::acs::laser::LaserComponent::getCategoryParent ( int  nodeId  )  [inline]
String com::cosylab::acs::laser::LaserComponent::getCategoryRootTopic (  )  [inline]
Category com::cosylab::acs::laser::LaserComponent::getCategoryTreeRoot (  )  [inline]
String com::cosylab::acs::laser::LaserComponent::getClientRootTopic (  )  [inline]
long com::cosylab::acs::laser::LaserComponent::getHeartbeatFrequency (  )  [inline]
String com::cosylab::acs::laser::LaserComponent::getHeartbeatTopic (  )  [inline]
Alarm [] com::cosylab::acs::laser::LaserComponent::getMultiplicityChildren ( String  parentId  )  [inline]
Alarm [] com::cosylab::acs::laser::LaserComponent::getMultiplicityParents ( String  childId  )  [inline]
int com::cosylab::acs::laser::LaserComponent::getMultiplicityThreshold ( String  parentId  )  [inline]
Alarm [] com::cosylab::acs::laser::LaserComponent::getNodeChildren ( String  parentId  )  [inline]
Alarm [] com::cosylab::acs::laser::LaserComponent::getNodeParents ( String  childId  )  [inline]
ResponsiblePerson [] com::cosylab::acs::laser::LaserComponent::getResponsiblePersons (  )  [inline]
String com::cosylab::acs::laser::LaserComponent::getSearchRootTopic (  )  [inline]
Source [] com::cosylab::acs::laser::LaserComponent::getSources (  )  [inline]
static String com::cosylab::acs::laser::LaserComponent::getString ( String  str  )  [inline, static, private]

Referenced by fromBusinessAlarm().

void com::cosylab::acs::laser::LaserComponent::initialize (  )  [inline]

References adminUserDAO, adminUserDefinitionService, alarmCache, alarmCacheListener, alarmCacheServer, alarmDAO, alarmDefinitionService, alarmMessageProcessor, alarmPublisher, alarmSourceMonitor, alSysContSvcs, categoryDAO, categoryDefinitionService, corbaServer, coreAlarms, coreService, com::cosylab::acs::jms::ACSJMSTopicConnectionFactory::createTopicConnection(), defaultTopicConnectionFactory, com::cosylab::acs::laser::dao::ACSSourceDAOImpl::getAllSourceIDs(), alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::getLogger(), com::cosylab::acs::laser::dao::ACSAlarmDAOImpl::getSources(), heartbeat, com::cosylab::acs::laser::dao::ACSAlarmDAOImpl::loadAlarms(), com::cosylab::acs::laser::dao::ACSCategoryDAOImpl::loadCategories(), logger, mailAndSmsServer, onMessage(), cern::laser::business::pojo::AlarmMessageProcessorImpl::process(), responsiblePersonDAO, cern::laser::business::pojo::SourceDefinitionServiceImpl::setAdminUserDAO(), cern::laser::business::pojo::CategoryDefinitionServiceImpl::setAdminUserDAO(), cern::laser::business::pojo::AlarmDefinitionServiceImpl::setAdminUserDAO(), cern::laser::business::pojo::AdminUserDefinitionServiceImpl::setAdminUserDAO(), cern::laser::business::pojo::SourceDefinitionServiceImpl::setAlarmCache(), cern::laser::business::pojo::CoreServiceImpl::setAlarmCache(), cern::laser::business::pojo::CategoryDefinitionServiceImpl::setAlarmCache(), cern::laser::business::pojo::AlarmMessageProcessorImpl::setAlarmCache(), cern::laser::business::pojo::AlarmDefinitionServiceImpl::setAlarmCache(), cern::laser::business::pojo::SourceDefinitionServiceImpl::setAlarmDAO(), cern::laser::business::pojo::CoreServiceImpl::setAlarmDAO(), cern::laser::business::pojo::CategoryDefinitionServiceImpl::setAlarmDAO(), cern::laser::business::pojo::AlarmDefinitionServiceImpl::setAlarmDAO(), cern::laser::business::pojo::AlarmCacheServerImpl::setAlarmDAO(), com::cosylab::acs::laser::dao::ACSResponsiblePersonDAOImpl::setAlarmDAO(), com::cosylab::acs::laser::dao::ACSSourceDAOImpl::setAlarmDAO(), cern::laser::business::pojo::SourceDefinitionServiceImpl::setAlarmDefinitionService(), cern::laser::business::pojo::AlarmSourceMonitorImpl::setAlarmMessageProcessor(), cern::laser::business::pojo::AlarmDefinitionServiceImpl::setAlarmMessageProcessor(), cern::laser::business::pojo::CoreServiceImpl::setAlarmPublisher(), cern::laser::business::pojo::AlarmDefinitionServiceImpl::setAlarmPublisher(), cern::laser::business::pojo::AlarmCacheServerImpl::setAlarmPublisher(), cern::laser::business::pojo::SourceDefinitionServiceImpl::setCategoryDAO(), cern::laser::business::pojo::CoreServiceImpl::setCategoryDAO(), cern::laser::business::pojo::CategoryDefinitionServiceImpl::setCategoryDAO(), cern::laser::business::pojo::AlarmDefinitionServiceImpl::setCategoryDAO(), cern::laser::business::pojo::AdminUserDefinitionServiceImpl::setCategoryDAO(), cern::laser::business::pojo::AlarmPublisherImpl::setCategoryRootTopic(), com::cosylab::acs::laser::dao::ACSCategoryDAOImpl::setCategoryTreeRoot(), cern::laser::business::pojo::CoreServiceImpl::setClientRootTopic(), com::cosylab::acs::laser::dao::ACSSourceDAOImpl::setConfAccessor(), com::cosylab::acs::laser::dao::ACSCategoryDAOImpl::setConfAccessor(), com::cosylab::acs::laser::dao::ACSAlarmDAOImpl::setConfAccessor(), cern::laser::business::pojo::HeartbeatImpl::setCoreService(), cern::laser::business::pojo::CoreServiceImpl::setHeartbeatFrequency(), cern::laser::business::pojo::CoreServiceImpl::setHeartbeatTopic(), com::cosylab::acs::laser::dao::ACSSourceDAOImpl::setLaserSourceId(), cern::laser::business::pojo::AlarmCacheServerImpl::setMailAndSmsServer(), cern::laser::business::pojo::SourceDefinitionServiceImpl::setResponsiblePersonDAO(), cern::laser::business::pojo::CoreServiceImpl::setResponsiblePersonDAO(), cern::laser::business::pojo::AlarmDefinitionServiceImpl::setResponsiblePersonDAO(), com::cosylab::acs::laser::dao::ACSAlarmDAOImpl::setResponsiblePersonDAO(), com::cosylab::acs::laser::dao::ACSSourceDAOImpl::setResponsiblePersonDAO(), cern::laser::business::pojo::CoreServiceImpl::setRootCategoryPK(), cern::laser::business::pojo::CoreServiceImpl::setSearchRootTopic(), cern::laser::business::pojo::SourceDefinitionServiceImpl::setSourceDAO(), cern::laser::business::pojo::CoreServiceImpl::setSourceDAO(), cern::laser::business::pojo::AlarmSourceMonitorImpl::setSourceDAO(), cern::laser::business::pojo::AlarmMessageProcessorImpl::setSourceDAO(), cern::laser::business::pojo::AlarmDefinitionServiceImpl::setSourceDAO(), cern::laser::business::pojo::AlarmSourceMonitorImpl::setSourceMonitorFrequency(), com::cosylab::acs::laser::dao::ACSAlarmDAOImpl::setSurveillanceAlarmId(), com::cosylab::acs::laser::dao::ACSCategoryDAOImpl::setSurveillanceCategoryPath(), cern::laser::business::pojo::HeartbeatImpl::setTopicConnectionFactory(), cern::laser::business::pojo::AlarmPublisherImpl::setTopicConnectionFactory(), sourceDAO, and sourceDefinitionService.

Referenced by LaserComponent().

boolean com::cosylab::acs::laser::LaserComponent::isACSAlarmService (  )  [inline]
String com::cosylab::acs::laser::LaserComponent::loginAdminUser ( String  name,
String  password 
) [inline]
synchronized void com::cosylab::acs::laser::LaserComponent::onMessage ( Message  message  )  [inline]
void com::cosylab::acs::laser::LaserComponent::search ( int[]  categoryIds,
String  sql,
String  clientId 
) [inline]
void com::cosylab::acs::laser::LaserComponent::select ( int[]  categoryIds,
String  client 
) throws LaserProcessingException [inline]
void com::cosylab::acs::laser::LaserComponent::sentCoreAlarms ( Vector< LaserCoreFaultCodes >  alarms  )  [inline]

Sent alarm services alarms.

The alarms generated by the alarm service are injected in the component by executing the onMessage

Parameters:
alarms The alarms to send alarms can be null or empty;

References alSysContSvcs, logger, and onMessage().

Referenced by execute().

synchronized void com::cosylab::acs::laser::LaserComponent::shutdown (  )  [inline]

Shutdown the alarm service

Implements alma::alarmsystem::AlarmServiceOperations.

References closed, and logger.

synchronized void com::cosylab::acs::laser::LaserComponent::submitAlarm ( Triplet  triplet,
boolean  active,
String  sourceHostName,
String  sourceName,
long  timestamp,
Property[]  alarmProperties 
) throws BadParameterEx, UnexpectedExceptionEx [inline]

IDL method: submit an alarm without.

Build a message to sent to the AlarmMessageProcessorImpl#process(Message).

Parameters:
triplet The triplet of the alarm
active if true the alarm is active
sourceHostName The name of the host of the source
timestamp The timestamp of the source
alarmProperties Additional user-defined properties of the alarm

References buildMessage(), logger, onMessage(), alma::ACSErrTypeCommon::wrappers::AcsJBadParameterEx::toBadParameterEx(), and alma::ACSErrTypeCommon::wrappers::AcsJUnexpectedExceptionEx::toUnexpectedExceptionEx().


Member Data Documentation

Referenced by initialize().

Referenced by initialize().

Referenced by initialize().

Referenced by initialize().

Referenced by createAlarm(), and initialize().

Referenced by initialize(), and onMessage().

Referenced by initialize().

The implementation of the ContainerServicesBase

Referenced by buildMessage(), initialize(), LaserComponent(), and sentCoreAlarms().

Referenced by initialize().

Referenced by createCategory(), and initialize().

volatile boolean com::cosylab::acs::laser::LaserComponent::closed = false [private]

Set to true if the alarm service has been shut down

Referenced by shutdown().

Vector<LaserCoreFaultCodes> com::cosylab::acs::laser::LaserComponent::coreAlarms = new Vector<LaserCoreFaultCodes>() [private]

If an error happens during initialization, the alarm service sends one or more alarms.

In case of errors during startup initialize() adds alarm in this vector. When the component becomes operation, execute() send all the alarms in the coreAlarms vector.

Referenced by execute(), and initialize().

Referenced by initialize().

Referenced by initialize().

Referenced by initialize().

Referenced by initialize().

Referenced by createSource(), and initialize().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2