Package org.opennms.netmgt.collectd
Class JMXDataSource
- java.lang.Object
-
- org.opennms.netmgt.collectd.JMXDataSource
-
- All Implemented Interfaces:
Cloneable
public class JMXDataSource extends Object implements Cloneable
This class encapsulates an RRDTool data source. Data source information parsed from the DataCollection.xml file is stored in RRDDataSource objects. For additional information on RRD and RRDTool see: http://ee-staff.ethz.ch/~oetiker/webtools/rrdtool/
-
-
Constructor Summary
Constructors Constructor Description JMXDataSource()ConstructorJMXDataSource(JMXDataSource second)Class copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectclone()Used to get a duplicate of self.intgetHeartbeat()getHeartbeatStringgetInstance()Returns the object's instance id.StringgetMax()getMaxStringgetMin()getMinStringgetName()Returns the object's name.StringgetOid()Returns the object's identifier.AttributeTypegetType()Returns the object's data type.voidsetHeartbeat(int heartbeat)setHeartbeatvoidsetInstance(String instance)This method is used to assign the object's instance id.voidsetMax(String maximum)setMaxvoidsetMin(String minimum)setMinvoidsetName(String name)This method is used to assign the data source name.voidsetOid(String oid)This method is used to assign the object's identifier.voidsetType(AttributeType type)This method is used to assign the object's expected data type.StringtoString()This method is responsible for returning a String object which represents the content of this RRDDataSource object.
-
-
-
Constructor Detail
-
JMXDataSource
public JMXDataSource()
Constructor
-
JMXDataSource
public JMXDataSource(JMXDataSource second)
Class copy constructor. Constructs a new object that is an identical to the passed object, however no data is shared between the two objects. Any changes to one will not affect the other.- Parameters:
second- The object to make a duplicate of.
-
-
Method Detail
-
setOid
public void setOid(String oid)
This method is used to assign the object's identifier.- Parameters:
oid- - object identifier in dotted decimal notation (e.g., ".1.3.6.1.2.1.1.1")
-
setInstance
public void setInstance(String instance)
This method is used to assign the object's instance id.- Parameters:
instance- - instance identifier (to be appended to oid)
-
setName
public void setName(String name)
This method is used to assign the data source name.- Parameters:
name- aStringobject.
-
getOid
public String getOid()
Returns the object's identifier.- Returns:
- The object's identifier string.
-
getInstance
public String getInstance()
Returns the object's instance id.- Returns:
- The object's instance id string.
-
getName
public String getName()
Returns the object's name.- Returns:
- The object's name.
-
setType
public void setType(AttributeType type)
This method is used to assign the object's expected data type.- Parameters:
type- - object's data type
-
setHeartbeat
public void setHeartbeat(int heartbeat)
setHeartbeat
- Parameters:
heartbeat- a int.
-
getType
public AttributeType getType()
Returns the object's data type.- Returns:
- The object's data type
-
getHeartbeat
public int getHeartbeat()
getHeartbeat
- Returns:
- a int.
-
clone
public Object clone()
Used to get a duplicate of self. The duplicate is identical to self but shares no common data.
-
-