org.opennms.netmgt.config.nsclient
Class NsclientConfig

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

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

Top-level element for the nsclient-config.xml configuration file.

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

Constructor Summary
NsclientConfig()
           
 
Method Summary
 void addDefinition(Definition vDefinition)
          Method addDefinition
 void addDefinition(int index, Definition vDefinition)
          Method addDefinition
 void clearDefinition()
          Method clearDefinition
 void deletePort()
          Method deletePort
 void deleteRetry()
          Method deleteRetry
 void deleteTimeout()
          Method deleteTimeout
 java.util.Enumeration enumerateDefinition()
          Method enumerateDefinition
 Definition[] getDefinition()
          Method getDefinition
 Definition getDefinition(int index)
          Method getDefinition
 java.util.ArrayList getDefinitionCollection()
          Method getDefinitionCollection Returns a reference to 'definition'.
 int getDefinitionCount()
          Method getDefinitionCount
 java.lang.String getPassword()
          Returns the value of field 'password'.
 int getPort()
          Returns the value of field 'port'.
 int getRetry()
          Returns the value of field 'retry'.
 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 removeDefinition(Definition vDefinition)
          Method removeDefinition
 void setDefinition(java.util.ArrayList definitionCollection)
          Method setDefinition Sets the value of 'definition' by copying the given ArrayList.
 void setDefinition(Definition[] definitionArray)
          Method setDefinition
 void setDefinition(int index, Definition vDefinition)
          Method setDefinition
 void setDefinitionCollection(java.util.ArrayList definitionCollection)
          Method setDefinitionCollection Sets the value of 'definition' 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 setRetry(int retry)
          Sets the value of field 'retry'.
 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

NsclientConfig

public NsclientConfig()
Method Detail

addDefinition

public void addDefinition(Definition vDefinition)
                   throws java.lang.IndexOutOfBoundsException
Method addDefinition

Parameters:
vDefinition -
Throws:
java.lang.IndexOutOfBoundsException

addDefinition

public void addDefinition(int index,
                          Definition vDefinition)
                   throws java.lang.IndexOutOfBoundsException
Method addDefinition

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

clearDefinition

public void clearDefinition()
Method clearDefinition


deletePort

public void deletePort()
Method deletePort


deleteRetry

public void deleteRetry()
Method deleteRetry


deleteTimeout

public void deleteTimeout()
Method deleteTimeout


enumerateDefinition

public java.util.Enumeration enumerateDefinition()
Method enumerateDefinition

Returns:
Enumeration

getDefinition

public Definition getDefinition(int index)
                         throws java.lang.IndexOutOfBoundsException
Method getDefinition

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

getDefinition

public Definition[] getDefinition()
Method getDefinition

Returns:
Definition

getDefinitionCollection

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

Returns:
ArrayList

getDefinitionCount

public int getDefinitionCount()
Method getDefinitionCount

Returns:
int

getPassword

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

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

getRetry

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

Returns:
int

getTimeout

public int getTimeout()
Returns the value of field 'timeout'. The field 'timeout' has the following description: Default 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

removeDefinition

public boolean removeDefinition(Definition vDefinition)
Method removeDefinition

Parameters:
vDefinition -
Returns:
boolean

setDefinition

public void setDefinition(int index,
                          Definition vDefinition)
                   throws java.lang.IndexOutOfBoundsException
Method setDefinition

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

setDefinition

public void setDefinition(Definition[] definitionArray)
Method setDefinition

Parameters:
definitionArray -

setDefinition

public void setDefinition(java.util.ArrayList definitionCollection)
Method setDefinition Sets the value of 'definition' by copying the given ArrayList.

Parameters:
definitionCollection - the Vector to copy.

setDefinitionCollection

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

Parameters:
definitionCollection - 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: Default password

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

setRetry

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

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

setTimeout

public void setTimeout(int timeout)
Sets the value of field 'timeout'. The field 'timeout' has the following description: Default 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.