org.opennms.netmgt.config.discovery
Class DiscoveryConfiguration

java.lang.Object
  extended by org.opennms.netmgt.config.discovery.DiscoveryConfiguration
All Implemented Interfaces:
java.io.Serializable

public class DiscoveryConfiguration
extends java.lang.Object
implements java.io.Serializable

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

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

Constructor Summary
DiscoveryConfiguration()
           
 
Method Summary
 void addExcludeRange(ExcludeRange vExcludeRange)
          Method addExcludeRange
 void addExcludeRange(int index, ExcludeRange vExcludeRange)
          Method addExcludeRange
 void addIncludeRange(IncludeRange vIncludeRange)
          Method addIncludeRange
 void addIncludeRange(int index, IncludeRange vIncludeRange)
          Method addIncludeRange
 void addIncludeUrl(IncludeUrl vIncludeUrl)
          Method addIncludeUrl
 void addIncludeUrl(int index, IncludeUrl vIncludeUrl)
          Method addIncludeUrl
 void addSpecific(int index, Specific vSpecific)
          Method addSpecific
 void addSpecific(Specific vSpecific)
          Method addSpecific
 void clearExcludeRange()
          Method clearExcludeRange
 void clearIncludeRange()
          Method clearIncludeRange
 void clearIncludeUrl()
          Method clearIncludeUrl
 void clearSpecific()
          Method clearSpecific
 void deleteInitialSleepTime()
          Method deleteInitialSleepTime
 void deletePacketsPerSecond()
          Method deletePacketsPerSecond
 void deleteRestartSleepTime()
          Method deleteRestartSleepTime
 void deleteRetries()
          Method deleteRetries
 void deleteThreads()
          Method deleteThreads
 void deleteTimeout()
          Method deleteTimeout
 java.util.Enumeration enumerateExcludeRange()
          Method enumerateExcludeRange
 java.util.Enumeration enumerateIncludeRange()
          Method enumerateIncludeRange
 java.util.Enumeration enumerateIncludeUrl()
          Method enumerateIncludeUrl
 java.util.Enumeration enumerateSpecific()
          Method enumerateSpecific
 ExcludeRange[] getExcludeRange()
          Method getExcludeRange
 ExcludeRange getExcludeRange(int index)
          Method getExcludeRange
 java.util.ArrayList getExcludeRangeCollection()
          Method getExcludeRangeCollection Returns a reference to 'excludeRange'.
 int getExcludeRangeCount()
          Method getExcludeRangeCount
 IncludeRange[] getIncludeRange()
          Method getIncludeRange
 IncludeRange getIncludeRange(int index)
          Method getIncludeRange
 java.util.ArrayList getIncludeRangeCollection()
          Method getIncludeRangeCollection Returns a reference to 'includeRange'.
 int getIncludeRangeCount()
          Method getIncludeRangeCount
 IncludeUrl[] getIncludeUrl()
          Method getIncludeUrl
 IncludeUrl getIncludeUrl(int index)
          Method getIncludeUrl
 java.util.ArrayList getIncludeUrlCollection()
          Method getIncludeUrlCollection Returns a reference to 'includeUrl'.
 int getIncludeUrlCount()
          Method getIncludeUrlCount
 long getInitialSleepTime()
          Returns the value of field 'initialSleepTime'.
 int getPacketsPerSecond()
          Returns the value of field 'packetsPerSecond'.
 long getRestartSleepTime()
          Returns the value of field 'restartSleepTime'.
 int getRetries()
          Returns the value of field 'retries'.
 Specific[] getSpecific()
          Method getSpecific
 Specific getSpecific(int index)
          Method getSpecific
 java.util.ArrayList getSpecificCollection()
          Method getSpecificCollection Returns a reference to 'specific'.
 int getSpecificCount()
          Method getSpecificCount
 int getThreads()
          Returns the value of field 'threads'.
 long getTimeout()
          Returns the value of field 'timeout'.
 boolean hasInitialSleepTime()
          Method hasInitialSleepTime
 boolean hasPacketsPerSecond()
          Method hasPacketsPerSecond
 boolean hasRestartSleepTime()
          Method hasRestartSleepTime
 boolean hasRetries()
          Method hasRetries
 boolean hasThreads()
          Method hasThreads
 boolean hasTimeout()
          Method hasTimeout
 boolean isValid()
          Method isValid
 void marshal(org.xml.sax.ContentHandler handler)
          Method marshal
 void marshal(java.io.Writer out)
          Method marshal
 boolean removeExcludeRange(ExcludeRange vExcludeRange)
          Method removeExcludeRange
 boolean removeIncludeRange(IncludeRange vIncludeRange)
          Method removeIncludeRange
 boolean removeIncludeUrl(IncludeUrl vIncludeUrl)
          Method removeIncludeUrl
 boolean removeSpecific(Specific vSpecific)
          Method removeSpecific
 void setExcludeRange(java.util.ArrayList excludeRangeCollection)
          Method setExcludeRange Sets the value of 'excludeRange' by copying the given ArrayList.
 void setExcludeRange(ExcludeRange[] excludeRangeArray)
          Method setExcludeRange
 void setExcludeRange(int index, ExcludeRange vExcludeRange)
          Method setExcludeRange
 void setExcludeRangeCollection(java.util.ArrayList excludeRangeCollection)
          Method setExcludeRangeCollection Sets the value of 'excludeRange' by setting it to the given ArrayList.
 void setIncludeRange(java.util.ArrayList includeRangeCollection)
          Method setIncludeRange Sets the value of 'includeRange' by copying the given ArrayList.
 void setIncludeRange(IncludeRange[] includeRangeArray)
          Method setIncludeRange
 void setIncludeRange(int index, IncludeRange vIncludeRange)
          Method setIncludeRange
 void setIncludeRangeCollection(java.util.ArrayList includeRangeCollection)
          Method setIncludeRangeCollection Sets the value of 'includeRange' by setting it to the given ArrayList.
 void setIncludeUrl(java.util.ArrayList includeUrlCollection)
          Method setIncludeUrl Sets the value of 'includeUrl' by copying the given ArrayList.
 void setIncludeUrl(IncludeUrl[] includeUrlArray)
          Method setIncludeUrl
 void setIncludeUrl(int index, IncludeUrl vIncludeUrl)
          Method setIncludeUrl
 void setIncludeUrlCollection(java.util.ArrayList includeUrlCollection)
          Method setIncludeUrlCollection Sets the value of 'includeUrl' by setting it to the given ArrayList.
 void setInitialSleepTime(long initialSleepTime)
          Sets the value of field 'initialSleepTime'.
 void setPacketsPerSecond(int packetsPerSecond)
          Sets the value of field 'packetsPerSecond'.
 void setRestartSleepTime(long restartSleepTime)
          Sets the value of field 'restartSleepTime'.
 void setRetries(int retries)
          Sets the value of field 'retries'.
 void setSpecific(java.util.ArrayList specificCollection)
          Method setSpecific Sets the value of 'specific' by copying the given ArrayList.
 void setSpecific(int index, Specific vSpecific)
          Method setSpecific
 void setSpecific(Specific[] specificArray)
          Method setSpecific
 void setSpecificCollection(java.util.ArrayList specificCollection)
          Method setSpecificCollection Sets the value of 'specific' by setting it to the given ArrayList.
 void setThreads(int threads)
          Sets the value of field 'threads'.
 void setTimeout(long timeout)
          Sets the value of field 'timeout'.
static java.lang.Object unmarshal(java.io.Reader reader)
          Method unmarshal
 void validate()
          Method validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiscoveryConfiguration

public DiscoveryConfiguration()
Method Detail

addExcludeRange

public void addExcludeRange(ExcludeRange vExcludeRange)
                     throws java.lang.IndexOutOfBoundsException
Method addExcludeRange

Parameters:
vExcludeRange -
Throws:
java.lang.IndexOutOfBoundsException

addExcludeRange

public void addExcludeRange(int index,
                            ExcludeRange vExcludeRange)
                     throws java.lang.IndexOutOfBoundsException
Method addExcludeRange

Parameters:
index -
vExcludeRange -
Throws:
java.lang.IndexOutOfBoundsException

addIncludeRange

public void addIncludeRange(IncludeRange vIncludeRange)
                     throws java.lang.IndexOutOfBoundsException
Method addIncludeRange

Parameters:
vIncludeRange -
Throws:
java.lang.IndexOutOfBoundsException

addIncludeRange

public void addIncludeRange(int index,
                            IncludeRange vIncludeRange)
                     throws java.lang.IndexOutOfBoundsException
Method addIncludeRange

Parameters:
index -
vIncludeRange -
Throws:
java.lang.IndexOutOfBoundsException

addIncludeUrl

public void addIncludeUrl(IncludeUrl vIncludeUrl)
                   throws java.lang.IndexOutOfBoundsException
Method addIncludeUrl

Parameters:
vIncludeUrl -
Throws:
java.lang.IndexOutOfBoundsException

addIncludeUrl

public void addIncludeUrl(int index,
                          IncludeUrl vIncludeUrl)
                   throws java.lang.IndexOutOfBoundsException
Method addIncludeUrl

Parameters:
index -
vIncludeUrl -
Throws:
java.lang.IndexOutOfBoundsException

addSpecific

public void addSpecific(Specific vSpecific)
                 throws java.lang.IndexOutOfBoundsException
Method addSpecific

Parameters:
vSpecific -
Throws:
java.lang.IndexOutOfBoundsException

addSpecific

public void addSpecific(int index,
                        Specific vSpecific)
                 throws java.lang.IndexOutOfBoundsException
Method addSpecific

Parameters:
index -
vSpecific -
Throws:
java.lang.IndexOutOfBoundsException

clearExcludeRange

public void clearExcludeRange()
Method clearExcludeRange


clearIncludeRange

public void clearIncludeRange()
Method clearIncludeRange


clearIncludeUrl

public void clearIncludeUrl()
Method clearIncludeUrl


clearSpecific

public void clearSpecific()
Method clearSpecific


deleteInitialSleepTime

public void deleteInitialSleepTime()
Method deleteInitialSleepTime


deletePacketsPerSecond

public void deletePacketsPerSecond()
Method deletePacketsPerSecond


deleteRestartSleepTime

public void deleteRestartSleepTime()
Method deleteRestartSleepTime


deleteRetries

public void deleteRetries()
Method deleteRetries


deleteThreads

public void deleteThreads()
Method deleteThreads


deleteTimeout

public void deleteTimeout()
Method deleteTimeout


enumerateExcludeRange

public java.util.Enumeration enumerateExcludeRange()
Method enumerateExcludeRange

Returns:
Enumeration

enumerateIncludeRange

public java.util.Enumeration enumerateIncludeRange()
Method enumerateIncludeRange

Returns:
Enumeration

enumerateIncludeUrl

public java.util.Enumeration enumerateIncludeUrl()
Method enumerateIncludeUrl

Returns:
Enumeration

enumerateSpecific

public java.util.Enumeration enumerateSpecific()
Method enumerateSpecific

Returns:
Enumeration

getExcludeRange

public ExcludeRange getExcludeRange(int index)
                             throws java.lang.IndexOutOfBoundsException
Method getExcludeRange

Parameters:
index -
Returns:
ExcludeRange
Throws:
java.lang.IndexOutOfBoundsException

getExcludeRange

public ExcludeRange[] getExcludeRange()
Method getExcludeRange

Returns:
ExcludeRange

getExcludeRangeCollection

public java.util.ArrayList getExcludeRangeCollection()
Method getExcludeRangeCollection Returns a reference to 'excludeRange'. No type checking is performed on any modications to the Collection.

Returns:
ArrayList

getExcludeRangeCount

public int getExcludeRangeCount()
Method getExcludeRangeCount

Returns:
int

getIncludeRange

public IncludeRange getIncludeRange(int index)
                             throws java.lang.IndexOutOfBoundsException
Method getIncludeRange

Parameters:
index -
Returns:
IncludeRange
Throws:
java.lang.IndexOutOfBoundsException

getIncludeRange

public IncludeRange[] getIncludeRange()
Method getIncludeRange

Returns:
IncludeRange

getIncludeRangeCollection

public java.util.ArrayList getIncludeRangeCollection()
Method getIncludeRangeCollection Returns a reference to 'includeRange'. No type checking is performed on any modications to the Collection.

Returns:
ArrayList

getIncludeRangeCount

public int getIncludeRangeCount()
Method getIncludeRangeCount

Returns:
int

getIncludeUrl

public IncludeUrl getIncludeUrl(int index)
                         throws java.lang.IndexOutOfBoundsException
Method getIncludeUrl

Parameters:
index -
Returns:
IncludeUrl
Throws:
java.lang.IndexOutOfBoundsException

getIncludeUrl

public IncludeUrl[] getIncludeUrl()
Method getIncludeUrl

Returns:
IncludeUrl

getIncludeUrlCollection

public java.util.ArrayList getIncludeUrlCollection()
Method getIncludeUrlCollection Returns a reference to 'includeUrl'. No type checking is performed on any modications to the Collection.

Returns:
ArrayList

getIncludeUrlCount

public int getIncludeUrlCount()
Method getIncludeUrlCount

Returns:
int

getInitialSleepTime

public long getInitialSleepTime()
Returns the value of field 'initialSleepTime'. The field 'initialSleepTime' has the following description: The initial pause (in milliseconds) after discovery starts up before discovery is started.

Returns:
long

getPacketsPerSecond

public int getPacketsPerSecond()
Returns the value of field 'packetsPerSecond'. The field 'packetsPerSecond' has the following description: the total number of ping packets sent per second from OpenNMS for discovery

Returns:
int

getRestartSleepTime

public long getRestartSleepTime()
Returns the value of field 'restartSleepTime'. The field 'restartSleepTime' has the following description: The pause (in milliseconds) between discovery passes. Once the discovery process completes a sweep of all the specified addresses, it sleeps for this duration before starting another sweep.

Returns:
long

getRetries

public int getRetries()
Returns the value of field 'retries'. The field 'retries' has the following description: The default number of times a ping is retried for an address. If there is no response after the first ping to an address, it is tried again for the specified number of retries. This retry count is a default and can be overridden for specific addresses or sets of addresses that are configured in this file.

Returns:
int

getSpecific

public Specific getSpecific(int index)
                     throws java.lang.IndexOutOfBoundsException
Method getSpecific

Parameters:
index -
Returns:
Specific
Throws:
java.lang.IndexOutOfBoundsException

getSpecific

public Specific[] getSpecific()
Method getSpecific

Returns:
Specific

getSpecificCollection

public java.util.ArrayList getSpecificCollection()
Method getSpecificCollection Returns a reference to 'specific'. No type checking is performed on any modications to the Collection.

Returns:
ArrayList

getSpecificCount

public int getSpecificCount()
Method getSpecificCount

Returns:
int

getThreads

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

Returns:
int

getTimeout

public long getTimeout()
Returns the value of field 'timeout'. The field 'timeout' has the following description: The default timeout on each poll. This timeout is a default and can be overridden for specific addresses or sets of addresses that are configured in this file.

Returns:
long

hasInitialSleepTime

public boolean hasInitialSleepTime()
Method hasInitialSleepTime

Returns:
boolean

hasPacketsPerSecond

public boolean hasPacketsPerSecond()
Method hasPacketsPerSecond

Returns:
boolean

hasRestartSleepTime

public boolean hasRestartSleepTime()
Method hasRestartSleepTime

Returns:
boolean

hasRetries

public boolean hasRetries()
Method hasRetries

Returns:
boolean

hasThreads

public boolean hasThreads()
Method hasThreads

Returns:
boolean

hasTimeout

public boolean hasTimeout()
Method hasTimeout

Returns:
boolean

isValid

public boolean isValid()
Method isValid

Returns:
boolean

marshal

public void marshal(java.io.Writer out)
             throws org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Method marshal

Parameters:
out -
Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

marshal

public void marshal(org.xml.sax.ContentHandler handler)
             throws java.io.IOException,
                    org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Method marshal

Parameters:
handler -
Throws:
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

removeExcludeRange

public boolean removeExcludeRange(ExcludeRange vExcludeRange)
Method removeExcludeRange

Parameters:
vExcludeRange -
Returns:
boolean

removeIncludeRange

public boolean removeIncludeRange(IncludeRange vIncludeRange)
Method removeIncludeRange

Parameters:
vIncludeRange -
Returns:
boolean

removeIncludeUrl

public boolean removeIncludeUrl(IncludeUrl vIncludeUrl)
Method removeIncludeUrl

Parameters:
vIncludeUrl -
Returns:
boolean

removeSpecific

public boolean removeSpecific(Specific vSpecific)
Method removeSpecific

Parameters:
vSpecific -
Returns:
boolean

setExcludeRange

public void setExcludeRange(int index,
                            ExcludeRange vExcludeRange)
                     throws java.lang.IndexOutOfBoundsException
Method setExcludeRange

Parameters:
index -
vExcludeRange -
Throws:
java.lang.IndexOutOfBoundsException

setExcludeRange

public void setExcludeRange(ExcludeRange[] excludeRangeArray)
Method setExcludeRange

Parameters:
excludeRangeArray -

setExcludeRange

public void setExcludeRange(java.util.ArrayList excludeRangeCollection)
Method setExcludeRange Sets the value of 'excludeRange' by copying the given ArrayList.

Parameters:
excludeRangeCollection - the Vector to copy.

setExcludeRangeCollection

public void setExcludeRangeCollection(java.util.ArrayList excludeRangeCollection)
Method setExcludeRangeCollection Sets the value of 'excludeRange' by setting it to the given ArrayList. No type checking is performed.

Parameters:
excludeRangeCollection - the ArrayList to copy.

setIncludeRange

public void setIncludeRange(int index,
                            IncludeRange vIncludeRange)
                     throws java.lang.IndexOutOfBoundsException
Method setIncludeRange

Parameters:
index -
vIncludeRange -
Throws:
java.lang.IndexOutOfBoundsException

setIncludeRange

public void setIncludeRange(IncludeRange[] includeRangeArray)
Method setIncludeRange

Parameters:
includeRangeArray -

setIncludeRange

public void setIncludeRange(java.util.ArrayList includeRangeCollection)
Method setIncludeRange Sets the value of 'includeRange' by copying the given ArrayList.

Parameters:
includeRangeCollection - the Vector to copy.

setIncludeRangeCollection

public void setIncludeRangeCollection(java.util.ArrayList includeRangeCollection)
Method setIncludeRangeCollection Sets the value of 'includeRange' by setting it to the given ArrayList. No type checking is performed.

Parameters:
includeRangeCollection - the ArrayList to copy.

setIncludeUrl

public void setIncludeUrl(int index,
                          IncludeUrl vIncludeUrl)
                   throws java.lang.IndexOutOfBoundsException
Method setIncludeUrl

Parameters:
index -
vIncludeUrl -
Throws:
java.lang.IndexOutOfBoundsException

setIncludeUrl

public void setIncludeUrl(IncludeUrl[] includeUrlArray)
Method setIncludeUrl

Parameters:
includeUrlArray -

setIncludeUrl

public void setIncludeUrl(java.util.ArrayList includeUrlCollection)
Method setIncludeUrl Sets the value of 'includeUrl' by copying the given ArrayList.

Parameters:
includeUrlCollection - the Vector to copy.

setIncludeUrlCollection

public void setIncludeUrlCollection(java.util.ArrayList includeUrlCollection)
Method setIncludeUrlCollection Sets the value of 'includeUrl' by setting it to the given ArrayList. No type checking is performed.

Parameters:
includeUrlCollection - the ArrayList to copy.

setInitialSleepTime

public void setInitialSleepTime(long initialSleepTime)
Sets the value of field 'initialSleepTime'. The field 'initialSleepTime' has the following description: The initial pause (in milliseconds) after discovery starts up before discovery is started.

Parameters:
initialSleepTime - the value of field 'initialSleepTime'

setPacketsPerSecond

public void setPacketsPerSecond(int packetsPerSecond)
Sets the value of field 'packetsPerSecond'. The field 'packetsPerSecond' has the following description: the total number of ping packets sent per second from OpenNMS for discovery

Parameters:
packetsPerSecond - the value of field 'packetsPerSecond'

setRestartSleepTime

public void setRestartSleepTime(long restartSleepTime)
Sets the value of field 'restartSleepTime'. The field 'restartSleepTime' has the following description: The pause (in milliseconds) between discovery passes. Once the discovery process completes a sweep of all the specified addresses, it sleeps for this duration before starting another sweep.

Parameters:
restartSleepTime - the value of field 'restartSleepTime'

setRetries

public void setRetries(int retries)
Sets the value of field 'retries'. The field 'retries' has the following description: The default number of times a ping is retried for an address. If there is no response after the first ping to an address, it is tried again for the specified number of retries. This retry count is a default and can be overridden for specific addresses or sets of addresses that are configured in this file.

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

setSpecific

public void setSpecific(int index,
                        Specific vSpecific)
                 throws java.lang.IndexOutOfBoundsException
Method setSpecific

Parameters:
index -
vSpecific -
Throws:
java.lang.IndexOutOfBoundsException

setSpecific

public void setSpecific(Specific[] specificArray)
Method setSpecific

Parameters:
specificArray -

setSpecific

public void setSpecific(java.util.ArrayList specificCollection)
Method setSpecific Sets the value of 'specific' by copying the given ArrayList.

Parameters:
specificCollection - the Vector to copy.

setSpecificCollection

public void setSpecificCollection(java.util.ArrayList specificCollection)
Method setSpecificCollection Sets the value of 'specific' by setting it to the given ArrayList. No type checking is performed.

Parameters:
specificCollection - the ArrayList to copy.

setThreads

public void setThreads(int threads)
Sets the value of field 'threads'. The field 'threads' has the following description: the number of threads to be used for discovery

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

setTimeout

public void setTimeout(long timeout)
Sets the value of field 'timeout'. The field 'timeout' has the following description: The default timeout on each poll. This timeout is a default and can be overridden for specific addresses or sets of addresses that are configured in this file.

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

unmarshal

public static java.lang.Object unmarshal(java.io.Reader reader)
                                  throws org.exolab.castor.xml.MarshalException,
                                         org.exolab.castor.xml.ValidationException
Method unmarshal

Parameters:
reader -
Returns:
Object
Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

validate

public void validate()
              throws org.exolab.castor.xml.ValidationException
Method validate

Throws:
org.exolab.castor.xml.ValidationException


Copyright © 2007. All Rights Reserved.