org.opennms.netmgt.config.statsd
Class StatisticsDaemonConfiguration

java.lang.Object
  extended by org.opennms.netmgt.config.statsd.StatisticsDaemonConfiguration
All Implemented Interfaces:
Serializable

public class StatisticsDaemonConfiguration
extends Object
implements Serializable

Top-level element for the statsd-configuration.xml configuration file.

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

Constructor Summary
StatisticsDaemonConfiguration()
           
 
Method Summary
 void addPackage(int index, Package vPackage)
           
 void addPackage(Package vPackage)
           
 void addReport(int index, Report vReport)
           
 void addReport(Report vReport)
           
 Enumeration<Package> enumeratePackage()
          Method enumeratePackage.
 Enumeration<Report> enumerateReport()
          Method enumerateReport.
 Package[] getPackage()
          Method getPackage.Returns the contents of the collection in an Array.
 Package getPackage(int index)
          Method getPackage.
 List<Package> getPackageCollection()
          Method getPackageCollection.Returns a reference to '_packageList'.
 int getPackageCount()
          Method getPackageCount.
 Report[] getReport()
          Method getReport.Returns the contents of the collection in an Array.
 Report getReport(int index)
          Method getReport.
 List<Report> getReportCollection()
          Method getReportCollection.Returns a reference to '_reportList'.
 int getReportCount()
          Method getReportCount.
 boolean isValid()
          Method isValid.
 Iterator<Package> iteratePackage()
          Method iteratePackage.
 Iterator<Report> iterateReport()
          Method iterateReport.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllPackage()
           
 void removeAllReport()
           
 boolean removePackage(Package vPackage)
          Method removePackage.
 Package removePackageAt(int index)
          Method removePackageAt.
 boolean removeReport(Report vReport)
          Method removeReport.
 Report removeReportAt(int index)
          Method removeReportAt.
 void setPackage(int index, Package vPackage)
           
 void setPackage(List<Package> vPackageList)
          Sets the value of '_packageList' by copying the given Vector.
 void setPackage(Package[] vPackageArray)
           
 void setPackageCollection(List<Package> _packageList)
          Deprecated.  
 void setReport(int index, Report vReport)
           
 void setReport(List<Report> vReportList)
          Sets the value of '_reportList' by copying the given Vector.
 void setReport(Report[] vReportArray)
           
 void setReportCollection(List<Report> reportList)
          Deprecated.  
static StatisticsDaemonConfiguration 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

StatisticsDaemonConfiguration

public StatisticsDaemonConfiguration()
Method Detail

addPackage

public void addPackage(Package vPackage)
                throws IndexOutOfBoundsException
Parameters:
vPackage -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addPackage

public void addPackage(int index,
                       Package vPackage)
                throws IndexOutOfBoundsException
Parameters:
index -
vPackage -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addReport

public void addReport(Report vReport)
               throws IndexOutOfBoundsException
Parameters:
vReport -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addReport

public void addReport(int index,
                      Report vReport)
               throws IndexOutOfBoundsException
Parameters:
index -
vReport -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumeratePackage

public Enumeration<Package> enumeratePackage()
Method enumeratePackage.

Returns:
an Enumeration over all possible elements of this collection

enumerateReport

public Enumeration<Report> enumerateReport()
Method enumerateReport.

Returns:
an Enumeration over all possible elements of this collection

getPackage

public Package getPackage(int index)
                   throws IndexOutOfBoundsException
Method getPackage.

Parameters:
index -
Returns:
the value of the org.opennms.netmgt.config.statsd.Package at the given index
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getPackage

public Package[] getPackage()
Method getPackage.Returns the contents of the collection in an Array.

Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.

Returns:
this collection as an Array

getPackageCollection

public List<Package> getPackageCollection()
Method getPackageCollection.Returns a reference to '_packageList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getPackageCount

public int getPackageCount()
Method getPackageCount.

Returns:
the size of this collection

getReport

public Report getReport(int index)
                 throws IndexOutOfBoundsException
Method getReport.

Parameters:
index -
Returns:
the value of the org.opennms.netmgt.config.statsd.Report at the given index
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getReport

public Report[] getReport()
Method getReport.Returns the contents of the collection in an Array.

Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.

Returns:
this collection as an Array

getReportCollection

public List<Report> getReportCollection()
Method getReportCollection.Returns a reference to '_reportList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getReportCount

public int getReportCount()
Method getReportCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

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

iteratePackage

public Iterator<Package> iteratePackage()
Method iteratePackage.

Returns:
an Iterator over all possible elements in this collection

iterateReport

public Iterator<Report> iterateReport()
Method iterateReport.

Returns:
an Iterator over all possible elements in this collection

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

removeAllPackage

public void removeAllPackage()

removeAllReport

public void removeAllReport()

removePackage

public boolean removePackage(Package vPackage)
Method removePackage.

Parameters:
vPackage -
Returns:
true if the object was removed from the collection.

removePackageAt

public Package removePackageAt(int index)
Method removePackageAt.

Parameters:
index -
Returns:
the element removed from the collection

removeReport

public boolean removeReport(Report vReport)
Method removeReport.

Parameters:
vReport -
Returns:
true if the object was removed from the collection.

removeReportAt

public Report removeReportAt(int index)
Method removeReportAt.

Parameters:
index -
Returns:
the element removed from the collection

setPackage

public void setPackage(int index,
                       Package vPackage)
                throws IndexOutOfBoundsException
Parameters:
index -
vPackage -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setPackage

public void setPackage(Package[] vPackageArray)
Parameters:
vPackageArray -

setPackage

public void setPackage(List<Package> vPackageList)
Sets the value of '_packageList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vPackageList - the Vector to copy.

setPackageCollection

public void setPackageCollection(List<Package> _packageList)
Deprecated. 

Sets the value of '_packageList' by setting it to the given Vector. No type checking is performed.

Parameters:
_packageList - the Vector to set.

setReport

public void setReport(int index,
                      Report vReport)
               throws IndexOutOfBoundsException
Parameters:
index -
vReport -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setReport

public void setReport(Report[] vReportArray)
Parameters:
vReportArray -

setReport

public void setReport(List<Report> vReportList)
Sets the value of '_reportList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vReportList - the Vector to copy.

setReportCollection

public void setReportCollection(List<Report> reportList)
Deprecated. 

Sets the value of '_reportList' by setting it to the given Vector. No type checking is performed.

Parameters:
reportList - the Vector to set.

unmarshal

public static StatisticsDaemonConfiguration 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.statsd.StatisticsDaemonConfiguratio
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.