org.opennms.netmgt.config.snmpinterfacepoller
Class SnmpInterfacePollerConfiguration

java.lang.Object
  extended by org.opennms.netmgt.config.snmpinterfacepoller.SnmpInterfacePollerConfiguration
All Implemented Interfaces:
Serializable

public class SnmpInterfacePollerConfiguration
extends Object
implements Serializable

Top-level element for the snmp-interface-poller-configuration.xml configuration file.

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

Constructor Summary
SnmpInterfacePollerConfiguration()
           
 
Method Summary
 void addPackage(int index, Package vPackage)
           
 void addPackage(Package vPackage)
           
 void deleteThreads()
           
 Enumeration<Package> enumeratePackage()
          Method enumeratePackage.
 NodeOutage getNodeOutage()
          Returns the value of field 'nodeOutage'.
 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.
 String getService()
          Returns the value of field 'service'.
 String getSuppressAdminDownEvent()
          Returns the value of field 'suppressAdminDownEvent'.
 int getThreads()
          Returns the value of field 'threads'.
 boolean hasThreads()
          Method hasThreads.
 boolean isValid()
          Method isValid.
 Iterator<Package> iteratePackage()
          Method iteratePackage.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllPackage()
           
 boolean removePackage(Package vPackage)
          Method removePackage.
 Package removePackageAt(int index)
          Method removePackageAt.
 void setNodeOutage(NodeOutage nodeOutage)
          Sets the value of field 'nodeOutage'.
 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 setService(String service)
          Sets the value of field 'service'.
 void setSuppressAdminDownEvent(String suppressAdminDownEvent)
          Sets the value of field 'suppressAdminDownEvent'.
 void setThreads(int threads)
          Sets the value of field 'threads'.
static SnmpInterfacePollerConfiguration 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

SnmpInterfacePollerConfiguration

public SnmpInterfacePollerConfiguration()
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

deleteThreads

public void deleteThreads()

enumeratePackage

public Enumeration<Package> enumeratePackage()
Method enumeratePackage.

Returns:
an Enumeration over all possible elements of this collection

getNodeOutage

public NodeOutage getNodeOutage()
Returns the value of field 'nodeOutage'. The field 'nodeOutage' has the following description: Configuration of node-outage functionality

Returns:
the value of field 'NodeOutage'.

getPackage

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

Parameters:
index -
Returns:
the value of the org.opennms.netmgt.config.snmpinterfacepoller.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

getService

public String getService()
Returns the value of field 'service'. The field 'service' has the following description: The SNMP service string usually 'SNMP'.

Returns:
the value of field 'Service'.

getSuppressAdminDownEvent

public String getSuppressAdminDownEvent()
Returns the value of field 'suppressAdminDownEvent'. The field 'suppressAdminDownEvent' has the following description: Flag which indicates to suppress Admin Status events at all

Returns:
the value of field 'SuppressAdminDownEvent'.

getThreads

public int getThreads()
Returns the value of field 'threads'. The field 'threads' has the following description: The maximum number of threads used for snmp polling.

Returns:
the value of field 'Threads'.

hasThreads

public boolean hasThreads()
Method hasThreads.

Returns:
true if at least one Threads has been added

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

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()

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

setNodeOutage

public void setNodeOutage(NodeOutage nodeOutage)
Sets the value of field 'nodeOutage'. The field 'nodeOutage' has the following description: Configuration of node-outage functionality

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

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.

setService

public void setService(String service)
Sets the value of field 'service'. The field 'service' has the following description: The SNMP service string usually 'SNMP'.

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

setSuppressAdminDownEvent

public void setSuppressAdminDownEvent(String suppressAdminDownEvent)
Sets the value of field 'suppressAdminDownEvent'. The field 'suppressAdminDownEvent' has the following description: Flag which indicates to suppress Admin Status events at all

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

setThreads

public void setThreads(int threads)
Sets the value of field 'threads'. The field 'threads' has the following description: The maximum number of threads used for snmp polling.

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

unmarshal

public static SnmpInterfacePollerConfiguration 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.snmpinterfacepoller.SnmpInterfacePollerConfiguration
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 © 2009. All Rights Reserved.