org.opennms.netmgt.config.nsclient
Class Definition

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

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

Provides a mechanism for associating one or more specific IP addresses and/or IP address ranges with a set of NSClient parms which will be used in place of the default values during NSClient data collection.

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

Constructor Summary
Definition()
           
 
Method Summary
 void addIpMatch(int index, java.lang.String vIpMatch)
          Method addIpMatch
 void addIpMatch(java.lang.String vIpMatch)
          Method addIpMatch
 void addRange(int index, Range vRange)
          Method addRange
 void addRange(Range vRange)
          Method addRange
 void addSpecific(int index, java.lang.String vSpecific)
          Method addSpecific
 void addSpecific(java.lang.String vSpecific)
          Method addSpecific
 void clearIpMatch()
          Method clearIpMatch
 void clearRange()
          Method clearRange
 void clearSpecific()
          Method clearSpecific
 void deletePort()
          Method deletePort
 void deleteRetry()
          Method deleteRetry
 void deleteTimeout()
          Method deleteTimeout
 java.util.Enumeration enumerateIpMatch()
          Method enumerateIpMatch
 java.util.Enumeration enumerateRange()
          Method enumerateRange
 java.util.Enumeration enumerateSpecific()
          Method enumerateSpecific
 java.lang.String[] getIpMatch()
          Method getIpMatch
 java.lang.String getIpMatch(int index)
          Method getIpMatch
 java.util.ArrayList getIpMatchCollection()
          Method getIpMatchCollection Returns a reference to 'ipMatch'.
 int getIpMatchCount()
          Method getIpMatchCount
 java.lang.String getPassword()
          Returns the value of field 'password'.
 int getPort()
          Returns the value of field 'port'.
 Range[] getRange()
          Method getRange
 Range getRange(int index)
          Method getRange
 java.util.ArrayList getRangeCollection()
          Method getRangeCollection Returns a reference to 'range'.
 int getRangeCount()
          Method getRangeCount
 int getRetry()
          Returns the value of field 'retry'.
 java.lang.String[] getSpecific()
          Method getSpecific
 java.lang.String getSpecific(int index)
          Method getSpecific
 java.util.ArrayList getSpecificCollection()
          Method getSpecificCollection Returns a reference to 'specific'.
 int getSpecificCount()
          Method getSpecificCount
 int getTimeout()
          Returns the value of field 'timeout'.
 boolean hasPort()
          Method hasPort
 boolean hasRetry()
          Method hasRetry
 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 removeIpMatch(java.lang.String vIpMatch)
          Method removeIpMatch
 boolean removeRange(Range vRange)
          Method removeRange
 boolean removeSpecific(java.lang.String vSpecific)
          Method removeSpecific
 void setIpMatch(java.util.ArrayList ipMatchCollection)
          Method setIpMatch Sets the value of 'ipMatch' by copying the given ArrayList.
 void setIpMatch(int index, java.lang.String vIpMatch)
          Method setIpMatch
 void setIpMatch(java.lang.String[] ipMatchArray)
          Method setIpMatch
 void setIpMatchCollection(java.util.ArrayList ipMatchCollection)
          Method setIpMatchCollection Sets the value of 'ipMatch' by setting it to the given ArrayList.
 void setPassword(java.lang.String password)
          Sets the value of field 'password'.
 void setPort(int port)
          Sets the value of field 'port'.
 void setRange(java.util.ArrayList rangeCollection)
          Method setRange Sets the value of 'range' by copying the given ArrayList.
 void setRange(int index, Range vRange)
          Method setRange
 void setRange(Range[] rangeArray)
          Method setRange
 void setRangeCollection(java.util.ArrayList rangeCollection)
          Method setRangeCollection Sets the value of 'range' by setting it to the given ArrayList.
 void setRetry(int retry)
          Sets the value of field 'retry'.
 void setSpecific(java.util.ArrayList specificCollection)
          Method setSpecific Sets the value of 'specific' by copying the given ArrayList.
 void setSpecific(int index, java.lang.String vSpecific)
          Method setSpecific
 void setSpecific(java.lang.String[] specificArray)
          Method setSpecific
 void setSpecificCollection(java.util.ArrayList specificCollection)
          Method setSpecificCollection Sets the value of 'specific' by setting it to the given ArrayList.
 void setTimeout(int 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

Definition

public Definition()
Method Detail

addIpMatch

public void addIpMatch(java.lang.String vIpMatch)
                throws java.lang.IndexOutOfBoundsException
Method addIpMatch

Parameters:
vIpMatch -
Throws:
java.lang.IndexOutOfBoundsException

addIpMatch

public void addIpMatch(int index,
                       java.lang.String vIpMatch)
                throws java.lang.IndexOutOfBoundsException
Method addIpMatch

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

addRange

public void addRange(Range vRange)
              throws java.lang.IndexOutOfBoundsException
Method addRange

Parameters:
vRange -
Throws:
java.lang.IndexOutOfBoundsException

addRange

public void addRange(int index,
                     Range vRange)
              throws java.lang.IndexOutOfBoundsException
Method addRange

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

addSpecific

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

Parameters:
vSpecific -
Throws:
java.lang.IndexOutOfBoundsException

addSpecific

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

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

clearIpMatch

public void clearIpMatch()
Method clearIpMatch


clearRange

public void clearRange()
Method clearRange


clearSpecific

public void clearSpecific()
Method clearSpecific


deletePort

public void deletePort()
Method deletePort


deleteRetry

public void deleteRetry()
Method deleteRetry


deleteTimeout

public void deleteTimeout()
Method deleteTimeout


enumerateIpMatch

public java.util.Enumeration enumerateIpMatch()
Method enumerateIpMatch

Returns:
Enumeration

enumerateRange

public java.util.Enumeration enumerateRange()
Method enumerateRange

Returns:
Enumeration

enumerateSpecific

public java.util.Enumeration enumerateSpecific()
Method enumerateSpecific

Returns:
Enumeration

getIpMatch

public java.lang.String getIpMatch(int index)
                            throws java.lang.IndexOutOfBoundsException
Method getIpMatch

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

getIpMatch

public java.lang.String[] getIpMatch()
Method getIpMatch

Returns:
String

getIpMatchCollection

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

Returns:
ArrayList

getIpMatchCount

public int getIpMatchCount()
Method getIpMatchCount

Returns:
int

getPassword

public java.lang.String getPassword()
Returns the value of field 'password'. The field 'password' has the following description: Password for this definition

Returns:
String

getPort

public int getPort()
Returns the value of field 'port'. The field 'port' has the following description: If set, overrides TCP port 1248 as the port where NSClient requests are sent.

Returns:
int

getRange

public Range getRange(int index)
               throws java.lang.IndexOutOfBoundsException
Method getRange

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

getRange

public Range[] getRange()
Method getRange

Returns:
Range

getRangeCollection

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

Returns:
ArrayList

getRangeCount

public int getRangeCount()
Method getRangeCount

Returns:
int

getRetry

public int getRetry()
Returns the value of field 'retry'. The field 'retry' has the following description: number of retries

Returns:
int

getSpecific

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

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

getSpecific

public java.lang.String[] getSpecific()
Method getSpecific

Returns:
String

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

getTimeout

public int getTimeout()
Returns the value of field 'timeout'. The field 'timeout' has the following description: timeout (in milliseconds)

Returns:
int

hasPort

public boolean hasPort()
Method hasPort

Returns:
boolean

hasRetry

public boolean hasRetry()
Method hasRetry

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

removeIpMatch

public boolean removeIpMatch(java.lang.String vIpMatch)
Method removeIpMatch

Parameters:
vIpMatch -
Returns:
boolean

removeRange

public boolean removeRange(Range vRange)
Method removeRange

Parameters:
vRange -
Returns:
boolean

removeSpecific

public boolean removeSpecific(java.lang.String vSpecific)
Method removeSpecific

Parameters:
vSpecific -
Returns:
boolean

setIpMatch

public void setIpMatch(int index,
                       java.lang.String vIpMatch)
                throws java.lang.IndexOutOfBoundsException
Method setIpMatch

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

setIpMatch

public void setIpMatch(java.lang.String[] ipMatchArray)
Method setIpMatch

Parameters:
ipMatchArray -

setIpMatch

public void setIpMatch(java.util.ArrayList ipMatchCollection)
Method setIpMatch Sets the value of 'ipMatch' by copying the given ArrayList.

Parameters:
ipMatchCollection - the Vector to copy.

setIpMatchCollection

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

Parameters:
ipMatchCollection - the ArrayList to copy.

setPassword

public void setPassword(java.lang.String password)
Sets the value of field 'password'. The field 'password' has the following description: Password for this definition

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

setPort

public void setPort(int port)
Sets the value of field 'port'. The field 'port' has the following description: If set, overrides TCP port 1248 as the port where NSClient requests are sent.

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

setRange

public void setRange(int index,
                     Range vRange)
              throws java.lang.IndexOutOfBoundsException
Method setRange

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

setRange

public void setRange(Range[] rangeArray)
Method setRange

Parameters:
rangeArray -

setRange

public void setRange(java.util.ArrayList rangeCollection)
Method setRange Sets the value of 'range' by copying the given ArrayList.

Parameters:
rangeCollection - the Vector to copy.

setRangeCollection

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

Parameters:
rangeCollection - the ArrayList to copy.

setRetry

public void setRetry(int retry)
Sets the value of field 'retry'. The field 'retry' has the following description: number of retries

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

setSpecific

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

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

setSpecific

public void setSpecific(java.lang.String[] 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.

setTimeout

public void setTimeout(int timeout)
Sets the value of field 'timeout'. The field 'timeout' has the following description: timeout (in milliseconds)

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.