OpenNMS API 1.2.9

## org.opennms.report.datablock
Class Service

    java.lang.Object
      org.opennms.report.datablock.StandardNamedObject
          org.opennms.report.datablock.Service

public class Service
extends StandardNamedObject

This class holds the service information and list of outages for the service.

Author:
  Jacinta Remedios , Oculan Corp

Field Summary
`private static java.lang.String` `LOG4J_CATEGORY` The log4j category used to log debug messsages and statements.
`private long` `m_busDownTime` DownTime during business hours.
`private long` `m_downTime` DownTime during regular hours.
`private long` `m_monitoredBusTime` Total Monitored Time during business hours.
`private long` `m_monitoredTime` Total Regular Monitored Time
`private OutageSvcTimesList` `m_outageList` List of outages.
`private double` `m_percentAvail` Percentage Availability during regular hours.
`private double` `m_percentBusAvail` Percentage Availability during business hours.

Fields inherited from class org.opennms.report.datablock.StandardNamedObject
``

Constructor Summary
`Service()` Default Constructor.
`Service(OutageSvcTimesList outages)` Constructor that sets the outages.
`Service(java.lang.String name)`
`Service(java.lang.String name, OutageSvcTimesList outages)` Constructor that sets the name and the outages.

Method Summary
`void` `addOutage(long lost)` Added outage.
`void` `addOutage(long lost, long regained)` Added outage.
`void` `addOutage(Outage outage)` Adds a lost time / regained time combination for the node.
`boolean` `equals(java.lang.Object obj)` Equals method.
`long` `getBusDownTime()` Returns the outage time for this service during business hours.
`double` `getBusPercentAvail()` Returns the percentage Availability for this service during business hours.
`double` `getDownTime()` Returns the outage time for this service.
`long` `getDownTime(long currentTime, long rollingWindow)` Return the outage for this service.
`long` `getMonitoredBusTime()` Returns the monitored time for this service during business hours.
`long` `getMonitoredTime()` Returns the percentage Availability for this service during business hours.
`OutageSvcTimesList` `getOutages()` Return the outages
`double` `getPercentAvail()` Returns the percentage Availability.
`double` `getPercentAvail(long currentTime, long rollingWindow)` Returns the Percentage Availability for the service

Methods inherited from class org.opennms.report.datablock.StandardNamedObject
`getName, setName`

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

Field Detail

### LOG4J_CATEGORY

    private static final java.lang.String LOG4J_CATEGORY

  The log4j category used to log debug messsages and statements.

  See Also:
    Constant Field Values

### m_outageList

    private OutageSvcTimesList m_outageList

  List of outages.

### m_percentAvail

    private double m_percentAvail

  Percentage Availability during regular hours.

### m_percentBusAvail

    private double m_percentBusAvail

  Percentage Availability during business hours.

### m_downTime

    private long m_downTime

  DownTime during regular hours.

### m_busDownTime

    private long m_busDownTime

  DownTime during business hours.

### m_monitoredTime

    private long m_monitoredTime

  Total Regular Monitored Time

### m_monitoredBusTime

    private long m_monitoredBusTime

  Total Monitored Time during business hours.

Constructor Detail

### Service

    public Service()

  Default Constructor.

### Service

    public Service(java.lang.String name)

### Service

    public Service(java.lang.String name,
                   OutageSvcTimesList outages)

  Constructor that sets the name and the outages.

Parameters:
  `name` - Name of the service.
  `outages` - Outages to be set for this service.

### Service

    public Service(OutageSvcTimesList outages)

  Constructor that sets the outages.

Parameters:
  `outages` - Outages for this service to be set.

Method Detail

### getDownTime

    public double getDownTime()

  Returns the outage time for this service.

### getBusDownTime

    public long getBusDownTime()

  Returns the outage time for this service during business hours.

### getPercentAvail

    public double getPercentAvail()

  Returns the percentage Availability.

### getBusPercentAvail

    public double getBusPercentAvail()

  Returns the percentage Availability for this service during business hours.

### getMonitoredTime

    public long getMonitoredTime()

  Returns the percentage Availability for this service during business hours.

### getMonitoredBusTime

    public long getMonitoredBusTime()

  Returns the monitored time for this service during business hours.

### getOutages

    public OutageSvcTimesList getOutages()

  Return the outages

  Returns:
    outages Outages to be set.

### addOutage

    public void addOutage(long lost,
                          long regained)

  Added outage.

### addOutage

    public void addOutage(long lost)

  Added outage.

### addOutage

    public void addOutage(Outage outage)

  Adds a lost time / regained time combination for the node.

### getDownTime

    public long getDownTime(long currentTime,
                            long rollingWindow)

  Return the outage for this service.

### getPercentAvail

    public double getPercentAvail(long currentTime,
                                  long rollingWindow)

  Returns the Percentage Availability for the service

  Parameters:
    `currentTime` - Time at the end of the Rolling Window.
    `rollingWindow` - Actual Monitored Time.
  Returns:
    Percentage Availability

### equals

    public boolean equals(java.lang.Object obj)

  Equals method.

OpenNMS API 1.2.9

Generated by ranger on May 19 2007 2335.