OpenNMS API 1.2.9

## org.opennms.netmgt.rtc
Class DataUpdater

    java.lang.Object
      org.opennms.netmgt.rtc.DataUpdater

All Implemented Interfaces:
  java.lang.Runnable

final class DataUpdater
extends java.lang.Object
implements java.lang.Runnable

The DataUpdater is created for each event by the event receiver. Depending on the event UEI, relevant information is read from the event and the DataManager informed so that data maintained by the RTC is kept up-to-date

Author:
  Sowmya Nataraj , OpenNMS.org

Field Summary
`private Event` `m_event` The event from which data is to be read

Constructor Summary
`DataUpdater(Event event)` Constructs the DataUpdater object

Method Summary
`private void` `handleAssetInfoChangedEvent(long nodeid)` If it is a assetInfoChanged method, update RTC
`private void` `handleInterfaceDown(long nodeid, java.lang.String ip, long eventTime)` If it is an interfaceDown, update downtime on the appropriate rtcnodes
`private void` `handleInterfaceReparented(java.lang.String ip, Parms eventParms)` Record the interfaceReparented info in the datastore
`private void` `handleInterfaceUp(long nodeid, java.lang.String ip, long eventTime)` If it is an interfaceUp, update regained time on the appropriate rtcnodes
`private void` `handleNodeDown(long nodeid, long eventTime)` If it is an nodeDown, update downtime on the appropriate rtcnodes
`private void` `handleNodeGainedService(long nodeid, java.lang.String ip, java.lang.String svcName)` If it is a nodeGainedService, create a new entry in the map
`private void` `handleNodeLostService(long nodeid, java.lang.String ip, java.lang.String svcName, long eventTime)` If it is a nodeLostService, update downtime on the rtcnode
`private void` `handleNodeRegainedService(long nodeid, java.lang.String ip, java.lang.String svcName, long eventTime)` If it is a nodeRegainedService, update downtime on the rtcnode
`private void` `handleNodeUp(long nodeid, long eventTime)` If it is a nodeUp, update regained time on the appropriate rtcnodes
`private void` `handleRtcSubscribe(Parms eventParms)` Inform the data sender of the new listener
`private void` `handleRtcUnsubscribe(Parms eventParms)` Inform the data sender of the listener unsubscribing
`private void` `handleServiceDeleted(long nodeid, java.lang.String ip, java.lang.String svcName)` If it is a serviceDeleted, remove corresponding rtcnodes from the map
`private void` `processEvent()` Read the event UEI, nodeid, interface and service - depending on the UEI, read event parms, if necessary, and call appropriate methods on the data manager to update data
`void` `run()` Process the event depending on the UEI and update date

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### m_event

    private Event m_event

  The event from which data is to be read

Constructor Detail

### DataUpdater

    public DataUpdater(Event event)

  Constructs the DataUpdater object

Method Detail

### handleNodeGainedService

    private void handleNodeGainedService(long nodeid,
                                         java.lang.String ip,
                                         java.lang.String svcName)

  If it is a nodeGainedService, create a new entry in the map

### handleNodeLostService

    private void handleNodeLostService(long nodeid,
                                       java.lang.String ip,
                                       java.lang.String svcName,
                                       long eventTime)

  If it is a nodeLostService, update downtime on the rtcnode

### handleInterfaceDown

    private void handleInterfaceDown(long nodeid,
                                     java.lang.String ip,
                                     long eventTime)

  If it is an interfaceDown, update downtime on the appropriate rtcnodes

### handleNodeDown

    private void handleNodeDown(long nodeid,
                                long eventTime)

  If it is an nodeDown, update downtime on the appropriate rtcnodes

### handleNodeUp

    private void handleNodeUp(long nodeid,
                              long eventTime)

  If it is a nodeUp, update regained time on the appropriate rtcnodes

### handleInterfaceUp

    private void handleInterfaceUp(long nodeid,
                                   java.lang.String ip,
                                   long eventTime)

  If it is an interfaceUp, update regained time on the appropriate rtcnodes

### handleNodeRegainedService

    private void handleNodeRegainedService(long nodeid,
                                           java.lang.String ip,
                                           java.lang.String svcName,
                                           long eventTime)

  If it is a nodeRegainedService, update downtime on the rtcnode

### handleServiceDeleted

    private void handleServiceDeleted(long nodeid,
                                      java.lang.String ip,
                                      java.lang.String svcName)

  If it is a serviceDeleted, remove corresponding rtcnodes from the map

### handleInterfaceReparented

    private void handleInterfaceReparented(java.lang.String ip,
                                           Parms eventParms)

  Record the interfaceReparented info in the datastore

### handleRtcSubscribe

    private void handleRtcSubscribe(Parms eventParms)

  Inform the data sender of the new listener

### handleRtcUnsubscribe

    private void handleRtcUnsubscribe(Parms eventParms)

  Inform the data sender of the listener unsubscribing

### handleAssetInfoChangedEvent

    private void handleAssetInfoChangedEvent(long nodeid)
                                      throws java.sql.SQLException,
                                             FilterParseException,
                                             RTCException

  If it is a assetInfoChanged method, update RTC

  Throws:
    `java.sql.SQLException`
    `FilterParseException`
    `RTCException`

### processEvent

    private void processEvent()
                       throws java.sql.SQLException,
                              FilterParseException,
                              RTCException

  Read the event UEI, nodeid, interface and service - depending on the UEI, read event parms, if necessary, and call appropriate methods on the data manager to update data

  Throws:
    `java.sql.SQLException`
    `FilterParseException`
    `RTCException`

### run

    public void run()

  Process the event depending on the UEI and update date

  Specified by:
    `run` in interface `java.lang.Runnable`

OpenNMS API 1.2.9

Generated by ranger on May 19 2007 2335.