org.opennms.bb.dp.poller.scheduler.utils
Class PollerModel

java.lang.Object
  |
  +--org.opennms.bb.dp.poller.scheduler.utils.PollerModel

public class PollerModel
extends Object

This class is responsible for holding information about a model parsed from the models.xml file.

Version:
$Revision: 1.2 $
Author:
Jason Johns, OpenNMS

Field Summary
static int DELETE_FLAG
           
private  List m_modelDetails
          The group of model begin, end and values build from the tags
private  String m_modelName
          The name of the model, from the tag
 
Constructor Summary
PollerModel(String aName)
          Default constructor, allocates the m_serviceDetails member
 
Method Summary
 void addInterval(ModelInterval anInterval)
          This method adds a new interval to the model
 int getIntervalValue(int lengthOfTime)
          This method gets the value of the model based on what begin time is passed in.
 String getModelName()
          This method returns the name of the model
 String toString()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

DELETE_FLAG

public static final int DELETE_FLAG

m_modelName

private String m_modelName
The name of the model, from the tag

m_modelDetails

private List m_modelDetails
The group of model begin, end and values build from the tags
Constructor Detail

PollerModel

public PollerModel(String aName)
Default constructor, allocates the m_serviceDetails member
Method Detail

addInterval

public void addInterval(ModelInterval anInterval)
This method adds a new interval to the model
Parameters:
ModelInterval - anInterval, a new ModelInterval object

getModelName

public String getModelName()
This method returns the name of the model
Returns:
String, the name of the model

getIntervalValue

public int getIntervalValue(int lengthOfTime)
This method gets the value of the model based on what begin time is passed in.
Parameters:
String - intervalBegin, the begin time of the interval
Returns:
String, the value of the interval end for the corresponding begin

toString

public String toString()
Overrides:
toString in class Object