org.opennms.netmgt.config.poller
Class PollerConfiguration

java.lang.Object
  extended by org.opennms.netmgt.config.poller.PollerConfiguration
All Implemented Interfaces:
Serializable

public class PollerConfiguration
extends Object
implements Serializable

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

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

Constructor Summary
PollerConfiguration()
           
 
Method Summary
 void addMonitor(int index, Monitor vMonitor)
           
 void addMonitor(Monitor vMonitor)
           
 void addPackage(int index, Package vPackage)
           
 void addPackage(Package vPackage)
           
 void deleteThreads()
           
 Enumeration<Monitor> enumerateMonitor()
          Method enumerateMonitor.
 Enumeration<Package> enumeratePackage()
          Method enumeratePackage.
 Monitor[] getMonitor()
          Method getMonitor.Returns the contents of the collection in an Array.
 Monitor getMonitor(int index)
          Method getMonitor.
 List<Monitor> getMonitorCollection()
          Method getMonitorCollection.Returns a reference to '_monitorList'.
 int getMonitorCount()
          Method getMonitorCount.
 String getNextOutageId()
          Returns the value of field 'nextOutageId'.
 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 getPathOutageEnabled()
          Returns the value of field 'pathOutageEnabled'.
 String getServiceUnresponsiveEnabled()
          Returns the value of field 'serviceUnresponsiveEnabled'.
 int getThreads()
          Returns the value of field 'threads'.
 String getXmlrpc()
          Returns the value of field 'xmlrpc'.
 boolean hasThreads()
          Method hasThreads.
 boolean isValid()
          Method isValid.
 Iterator<Monitor> iterateMonitor()
          Method iterateMonitor.
 Iterator<Package> iteratePackage()
          Method iteratePackage.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllMonitor()
           
 void removeAllPackage()
           
 boolean removeMonitor(Monitor vMonitor)
          Method removeMonitor.
 Monitor removeMonitorAt(int index)
          Method removeMonitorAt.
 boolean removePackage(Package vPackage)
          Method removePackage.
 Package removePackageAt(int index)
          Method removePackageAt.
 void setMonitor(int index, Monitor vMonitor)
           
 void setMonitor(List<Monitor> vMonitorList)
          Sets the value of '_monitorList' by copying the given Vector.
 void setMonitor(Monitor[] vMonitorArray)
           
 void setMonitorCollection(List<Monitor> monitorList)
          Deprecated.  
 void setNextOutageId(String nextOutageId)
          Sets the value of field 'nextOutageId'.
 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 setPathOutageEnabled(String pathOutageEnabled)
          Sets the value of field 'pathOutageEnabled'.
 void setServiceUnresponsiveEnabled(String serviceUnresponsiveEnabled)
          Sets the value of field 'serviceUnresponsiveEnabled'.
 void setThreads(int threads)
          Sets the value of field 'threads'.
 void setXmlrpc(String xmlrpc)
          Sets the value of field 'xmlrpc'.
static PollerConfiguration 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

PollerConfiguration

public PollerConfiguration()
Method Detail

addMonitor

public void addMonitor(Monitor vMonitor)
                throws IndexOutOfBoundsException
Parameters:
vMonitor -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addMonitor

public void addMonitor(int index,
                       Monitor vMonitor)
                throws IndexOutOfBoundsException
Parameters:
index -
vMonitor -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

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

enumerateMonitor

public Enumeration<Monitor> enumerateMonitor()
Method enumerateMonitor.

Returns:
an Enumeration over all possible elements of this collection

enumeratePackage

public Enumeration<Package> enumeratePackage()
Method enumeratePackage.

Returns:
an Enumeration over all possible elements of this collection

getMonitor

public Monitor getMonitor(int index)
                   throws IndexOutOfBoundsException
Method getMonitor.

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

getMonitor

public Monitor[] getMonitor()
Method getMonitor.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

getMonitorCollection

public List<Monitor> getMonitorCollection()
Method getMonitorCollection.Returns a reference to '_monitorList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getMonitorCount

public int getMonitorCount()
Method getMonitorCount.

Returns:
the size of this collection

getNextOutageId

public String getNextOutageId()
Returns the value of field 'nextOutageId'. The field 'nextOutageId' has the following description: SQL query for getting the next outage ID.

Returns:
the value of field 'NextOutageId'.

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.poller.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

getPathOutageEnabled

public String getPathOutageEnabled()
Returns the value of field 'pathOutageEnabled'. The field 'pathOutageEnabled' has the following description: Flag which indicates if the optional path outage feature is enabled

Returns:
the value of field 'PathOutageEnabled'.

getServiceUnresponsiveEnabled

public String getServiceUnresponsiveEnabled()
Returns the value of field 'serviceUnresponsiveEnabled'. The field 'serviceUnresponsiveEnabled' has the following description: Enable/disable serviceUnresponsive behavior

Returns:
the value of field 'ServiceUnresponsiveEnabled'.

getThreads

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

Returns:
the value of field 'Threads'.

getXmlrpc

public String getXmlrpc()
Returns the value of field 'xmlrpc'. The field 'xmlrpc' has the following description: Flag which indicates if an external XMLRPC server has to be notified with any event process errors

Returns:
the value of field 'Xmlrpc'.

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

iterateMonitor

public Iterator<Monitor> iterateMonitor()
Method iterateMonitor.

Returns:
an Iterator over all possible elements in this collection

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

removeAllMonitor

public void removeAllMonitor()

removeAllPackage

public void removeAllPackage()

removeMonitor

public boolean removeMonitor(Monitor vMonitor)
Method removeMonitor.

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

removeMonitorAt

public Monitor removeMonitorAt(int index)
Method removeMonitorAt.

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

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

setMonitor

public void setMonitor(int index,
                       Monitor vMonitor)
                throws IndexOutOfBoundsException
Parameters:
index -
vMonitor -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setMonitor

public void setMonitor(Monitor[] vMonitorArray)
Parameters:
vMonitorArray -

setMonitor

public void setMonitor(List<Monitor> vMonitorList)
Sets the value of '_monitorList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vMonitorList - the Vector to copy.

setMonitorCollection

public void setMonitorCollection(List<Monitor> monitorList)
Deprecated. 

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

Parameters:
monitorList - the Vector to set.

setNextOutageId

public void setNextOutageId(String nextOutageId)
Sets the value of field 'nextOutageId'. The field 'nextOutageId' has the following description: SQL query for getting the next outage ID.

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

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.

setPathOutageEnabled

public void setPathOutageEnabled(String pathOutageEnabled)
Sets the value of field 'pathOutageEnabled'. The field 'pathOutageEnabled' has the following description: Flag which indicates if the optional path outage feature is enabled

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

setServiceUnresponsiveEnabled

public void setServiceUnresponsiveEnabled(String serviceUnresponsiveEnabled)
Sets the value of field 'serviceUnresponsiveEnabled'. The field 'serviceUnresponsiveEnabled' has the following description: Enable/disable serviceUnresponsive behavior

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

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 polling.

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

setXmlrpc

public void setXmlrpc(String xmlrpc)
Sets the value of field 'xmlrpc'. The field 'xmlrpc' has the following description: Flag which indicates if an external XMLRPC server has to be notified with any event process errors

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

unmarshal

public static PollerConfiguration 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.poller.PollerConfiguration
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.