org.opennms.netmgt.config.datacollection
Class MibObj

java.lang.Object
  extended by org.opennms.netmgt.config.datacollection.MibObj
All Implemented Interfaces:
Serializable

public class MibObj
extends Object
implements Serializable

a MIB object

Version:
$Revision$ $Date$
See Also:
Serialized Form

Constructor Summary
MibObj()
           
 
Method Summary
 String getAlias()
          Returns the value of field 'alias'.
 String getInstance()
          Returns the value of field 'instance'.
 String getMaxval()
          Returns the value of field 'maxval'.
 String getMinval()
          Returns the value of field 'minval'.
 String getOid()
          Returns the value of field 'oid'.
 String getType()
          Returns the value of field 'type'.
 boolean isValid()
          Method isValid.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void setAlias(String alias)
          Sets the value of field 'alias'.
 void setInstance(String instance)
          Sets the value of field 'instance'.
 void setMaxval(String maxval)
          Sets the value of field 'maxval'.
 void setMinval(String minval)
          Sets the value of field 'minval'.
 void setOid(String oid)
          Sets the value of field 'oid'.
 void setType(String type)
          Sets the value of field 'type'.
static MibObj unmarshal(Reader reader)
          Method unmarshal.
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MibObj

public MibObj()
Method Detail

getAlias

public String getAlias()
Returns the value of field 'alias'. The field 'alias' has the following description: a human readable name for the object (such as "ifOctetsIn"). NOTE: This value is used as the RRD file name and data source name. RRD only supports data source names up to 19 chars in length. If the SNMP data collector encounters an alias which exceeds 19 characters it will be truncated.

Returns:
the value of field 'Alias'.

getInstance

public String getInstance()
Returns the value of field 'instance'. The field 'instance' has the following description: instance identifier. Only valid instance identifier values are a positive integer value or the keyword "ifIndex" which indicates that the ifIndex of the interface is to be substituted for the instance value for each interface the oid is retrieved for.

Returns:
the value of field 'Instance'.

getMaxval

public String getMaxval()
Returns the value of field 'maxval'. The field 'maxval' has the following description: Maximum Value. In order to correctly manage counter wraps, it is possible to add a maximum value for a collection. For example, a 32-bit counter would have a max value of 4294967295.

Returns:
the value of field 'Maxval'.

getMinval

public String getMinval()
Returns the value of field 'minval'. The field 'minval' has the following description: Minimum Value. For completeness, adding the ability to use a minimum value.

Returns:
the value of field 'Minval'.

getOid

public String getOid()
Returns the value of field 'oid'. The field 'oid' has the following description: object identifier

Returns:
the value of field 'Oid'.

getType

public String getType()
Returns the value of field 'type'. The field 'type' has the following description: SNMP data type SNMP supported types: counter, gauge, timeticks, integer, octetstring, string. The SNMP type is mapped to one of two RRD supported data types COUNTER or GAUGE, or the string.properties file. The mapping is as follows: SNMP counter -> RRD COUNTER; SNMP gauge, timeticks, integer, octetstring -> RRD GAUGE; SNMP string -> String properties file

Returns:
the value of field 'Type'.

isValid

public boolean isValid()
Method isValid.

Returns:
true if this object is valid according to the schema

marshal

public void marshal(Writer out)
             throws org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
out -
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

marshal

public void marshal(ContentHandler handler)
             throws IOException,
                    org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
handler -
Throws:
IOException - if an IOException occurs during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling

setAlias

public void setAlias(String alias)
Sets the value of field 'alias'. The field 'alias' has the following description: a human readable name for the object (such as "ifOctetsIn"). NOTE: This value is used as the RRD file name and data source name. RRD only supports data source names up to 19 chars in length. If the SNMP data collector encounters an alias which exceeds 19 characters it will be truncated.

Parameters:
alias - the value of field 'alias'.

setInstance

public void setInstance(String instance)
Sets the value of field 'instance'. The field 'instance' has the following description: instance identifier. Only valid instance identifier values are a positive integer value or the keyword "ifIndex" which indicates that the ifIndex of the interface is to be substituted for the instance value for each interface the oid is retrieved for.

Parameters:
instance - the value of field 'instance'.

setMaxval

public void setMaxval(String maxval)
Sets the value of field 'maxval'. The field 'maxval' has the following description: Maximum Value. In order to correctly manage counter wraps, it is possible to add a maximum value for a collection. For example, a 32-bit counter would have a max value of 4294967295.

Parameters:
maxval - the value of field 'maxval'.

setMinval

public void setMinval(String minval)
Sets the value of field 'minval'. The field 'minval' has the following description: Minimum Value. For completeness, adding the ability to use a minimum value.

Parameters:
minval - the value of field 'minval'.

setOid

public void setOid(String oid)
Sets the value of field 'oid'. The field 'oid' has the following description: object identifier

Parameters:
oid - the value of field 'oid'.

setType

public void setType(String type)
Sets the value of field 'type'. The field 'type' has the following description: SNMP data type SNMP supported types: counter, gauge, timeticks, integer, octetstring, string. The SNMP type is mapped to one of two RRD supported data types COUNTER or GAUGE, or the string.properties file. The mapping is as follows: SNMP counter -> RRD COUNTER; SNMP gauge, timeticks, integer, octetstring -> RRD GAUGE; SNMP string -> String properties file

Parameters:
type - the value of field 'type'.

unmarshal

public static MibObj unmarshal(Reader reader)
                        throws org.exolab.castor.xml.MarshalException,
                               org.exolab.castor.xml.ValidationException
Method unmarshal.

Parameters:
reader -
Returns:
the unmarshaled org.opennms.netmgt.config.datacollection.MibObj
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

validate

public void validate()
              throws org.exolab.castor.xml.ValidationException
Throws:
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema


Copyright © 2008. All Rights Reserved.