Package org.opennms.netmgt.translator
Class EventTranslator
- java.lang.Object
-
- org.opennms.netmgt.daemon.AbstractServiceDaemon
-
- org.opennms.netmgt.translator.EventTranslator
-
- All Implemented Interfaces:
Fiber
,PausableFiber
,SpringServiceDaemon
,EventListener
,ServiceDaemon
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.InitializingBean
public class EventTranslator extends AbstractServiceDaemon implements EventListener
EventTranslator class.
- Author:
- Mathew Brozowski, David Hustace, Mike Huot
-
-
Field Summary
-
Fields inherited from interface org.opennms.core.fiber.Fiber
RUNNING, START_PENDING, STARTING, STATUS_NAMES, STOP_PENDING, STOPPED
-
Fields inherited from interface org.opennms.core.fiber.PausableFiber
PAUSE_PENDING, PAUSED, RESUME_PENDING
-
-
Constructor Summary
Constructors Constructor Description EventTranslator()
Constructor for EventTranslator.EventTranslator(EventIpcManager eventMgr)
Constructor for EventTranslator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description EventTranslatorConfig
getConfig()
getConfigjavax.sql.DataSource
getDataSource()
getDataSourceEventIpcManager
getEventManager()
getEventManagerstatic EventTranslator
getInstance()
getInstanceprotected void
handleReloadEvent(Event e)
Re-marshals the translator specs into the factory's config member and re-registers the UIEs with the eventProxy.void
onEvent(IEvent ie)
Process a sent event.protected void
onInit()
onInitprotected void
onStop()
onStopvoid
setConfig(EventTranslatorConfig config)
setConfigvoid
setDataSource(javax.sql.DataSource dataSource)
setDataSourcevoid
setEventManager(EventIpcManager eventMgr)
setEventManagerstatic void
setInstance(EventTranslator psk)
setInstance-
Methods inherited from class org.opennms.netmgt.daemon.AbstractServiceDaemon
afterPropertiesSet, destroy, getName, getStatus, getStatusText, init, isPaused, isRunning, isStarting, onPause, onResume, onStart, pause, resume, setStatus, start, status, stop, waitForStatus, waitForStatus
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opennms.netmgt.events.api.EventListener
getName
-
-
-
-
Constructor Detail
-
EventTranslator
public EventTranslator()
Constructor for EventTranslator.
-
EventTranslator
public EventTranslator(EventIpcManager eventMgr)
Constructor for EventTranslator.
- Parameters:
eventMgr
- aEventIpcManager
object.
-
-
Method Detail
-
setInstance
public static void setInstance(EventTranslator psk)
setInstance
- Parameters:
psk
- aEventTranslator
object.
-
getInstance
public static EventTranslator getInstance()
getInstance
- Returns:
- a
EventTranslator
object.
-
onInit
protected void onInit()
onInit
- Specified by:
onInit
in classAbstractServiceDaemon
-
onStop
protected void onStop()
onStop
- Overrides:
onStop
in classAbstractServiceDaemon
-
onEvent
public void onEvent(IEvent ie)
Process a sent event.- Specified by:
onEvent
in interfaceEventListener
- Parameters:
ie
- aIEvent
object.
-
handleReloadEvent
protected void handleReloadEvent(Event e)
Re-marshals the translator specs into the factory's config member and re-registers the UIEs with the eventProxy.- Parameters:
e
- The reload daemon config eventEvent
-
getEventManager
public EventIpcManager getEventManager()
getEventManager
- Returns:
- a
EventIpcManager
object.
-
setEventManager
public void setEventManager(EventIpcManager eventMgr)
setEventManager
- Parameters:
eventMgr
- aEventIpcManager
object.
-
getConfig
public EventTranslatorConfig getConfig()
getConfig
- Returns:
- a
EventTranslatorConfig
object.
-
setConfig
public void setConfig(EventTranslatorConfig config)
setConfig
- Parameters:
config
- aEventTranslatorConfig
object.
-
getDataSource
public javax.sql.DataSource getDataSource()
getDataSource
- Returns:
- a
DataSource
object.
-
setDataSource
public void setDataSource(javax.sql.DataSource dataSource)
setDataSource
- Parameters:
dataSource
- aDataSource
object.
-
-