org.opennms.netmgt.config.capsd
Class CapsdConfiguration

java.lang.Object
  extended by org.opennms.netmgt.config.capsd.CapsdConfiguration
All Implemented Interfaces:
Serializable

public class CapsdConfiguration
extends Object
implements Serializable

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

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

Constructor Summary
CapsdConfiguration()
           
 
Method Summary
 void addIpManagement(int index, IpManagement vIpManagement)
           
 void addIpManagement(IpManagement vIpManagement)
           
 void addProtocolPlugin(int index, ProtocolPlugin vProtocolPlugin)
           
 void addProtocolPlugin(ProtocolPlugin vProtocolPlugin)
           
 void deleteInitialSleepTime()
           
 void deleteMaxRescanThreadPoolSize()
           
 void deleteMaxSuspectThreadPoolSize()
           
 void deleteRescanFrequency()
           
 Enumeration<IpManagement> enumerateIpManagement()
          Method enumerateIpManagement.
 Enumeration<ProtocolPlugin> enumerateProtocolPlugin()
          Method enumerateProtocolPlugin.
 String getAbortProtocolScansIfNoRoute()
          Returns the value of field 'abortProtocolScansIfNoRoute'.
 String getDeletePropagationEnabled()
          Returns the value of field 'deletePropagationEnabled'.
 long getInitialSleepTime()
          Returns the value of field 'initialSleepTime'.
 IpManagement[] getIpManagement()
          Method getIpManagement.Returns the contents of the collection in an Array.
 IpManagement getIpManagement(int index)
          Method getIpManagement.
 List<IpManagement> getIpManagementCollection()
          Method getIpManagementCollection.Returns a reference to '_ipManagementList'.
 int getIpManagementCount()
          Method getIpManagementCount.
 String getManagementPolicy()
          Returns the value of field 'managementPolicy'.
 int getMaxRescanThreadPoolSize()
          Returns the value of field 'maxRescanThreadPoolSize'.
 int getMaxSuspectThreadPoolSize()
          Returns the value of field 'maxSuspectThreadPoolSize'.
 ProtocolPlugin[] getProtocolPlugin()
          Method getProtocolPlugin.Returns the contents of the collection in an Array.
 ProtocolPlugin getProtocolPlugin(int index)
          Method getProtocolPlugin.
 List<ProtocolPlugin> getProtocolPluginCollection()
          Method getProtocolPluginCollection.Returns a reference to '_protocolPluginList'.
 int getProtocolPluginCount()
          Method getProtocolPluginCount.
 long getRescanFrequency()
          Returns the value of field 'rescanFrequency'.
 SmbConfig getSmbConfig()
          Returns the value of field 'smbConfig'.
 String getXmlrpc()
          Returns the value of field 'xmlrpc'.
 boolean hasInitialSleepTime()
          Method hasInitialSleepTime.
 boolean hasMaxRescanThreadPoolSize()
          Method hasMaxRescanThreadPoolSize.
 boolean hasMaxSuspectThreadPoolSize()
          Method hasMaxSuspectThreadPoolSize.
 boolean hasRescanFrequency()
          Method hasRescanFrequency.
 boolean isValid()
          Method isValid.
 Iterator<IpManagement> iterateIpManagement()
          Method iterateIpManagement.
 Iterator<ProtocolPlugin> iterateProtocolPlugin()
          Method iterateProtocolPlugin.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllIpManagement()
           
 void removeAllProtocolPlugin()
           
 boolean removeIpManagement(IpManagement vIpManagement)
          Method removeIpManagement.
 IpManagement removeIpManagementAt(int index)
          Method removeIpManagementAt.
 boolean removeProtocolPlugin(ProtocolPlugin vProtocolPlugin)
          Method removeProtocolPlugin.
 ProtocolPlugin removeProtocolPluginAt(int index)
          Method removeProtocolPluginAt.
 void setAbortProtocolScansIfNoRoute(String abortProtocolScansIfNoRoute)
          Sets the value of field 'abortProtocolScansIfNoRoute'.
 void setDeletePropagationEnabled(String deletePropagationEnabled)
          Sets the value of field 'deletePropagationEnabled'.
 void setInitialSleepTime(long initialSleepTime)
          Sets the value of field 'initialSleepTime'.
 void setIpManagement(int index, IpManagement vIpManagement)
           
 void setIpManagement(IpManagement[] vIpManagementArray)
           
 void setIpManagement(List<IpManagement> vIpManagementList)
          Sets the value of '_ipManagementList' by copying the given Vector.
 void setIpManagementCollection(List<IpManagement> ipManagementList)
          Deprecated.  
 void setManagementPolicy(String managementPolicy)
          Sets the value of field 'managementPolicy'.
 void setMaxRescanThreadPoolSize(int maxRescanThreadPoolSize)
          Sets the value of field 'maxRescanThreadPoolSize'.
 void setMaxSuspectThreadPoolSize(int maxSuspectThreadPoolSize)
          Sets the value of field 'maxSuspectThreadPoolSize'.
 void setProtocolPlugin(int index, ProtocolPlugin vProtocolPlugin)
           
 void setProtocolPlugin(List<ProtocolPlugin> vProtocolPluginList)
          Sets the value of '_protocolPluginList' by copying the given Vector.
 void setProtocolPlugin(ProtocolPlugin[] vProtocolPluginArray)
           
 void setProtocolPluginCollection(List<ProtocolPlugin> protocolPluginList)
          Deprecated.  
 void setRescanFrequency(long rescanFrequency)
          Sets the value of field 'rescanFrequency'.
 void setSmbConfig(SmbConfig smbConfig)
          Sets the value of field 'smbConfig'.
 void setXmlrpc(String xmlrpc)
          Sets the value of field 'xmlrpc'.
static CapsdConfiguration 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

CapsdConfiguration

public CapsdConfiguration()
Method Detail

addIpManagement

public void addIpManagement(IpManagement vIpManagement)
                     throws IndexOutOfBoundsException
Parameters:
vIpManagement -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addIpManagement

public void addIpManagement(int index,
                            IpManagement vIpManagement)
                     throws IndexOutOfBoundsException
Parameters:
index -
vIpManagement -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addProtocolPlugin

public void addProtocolPlugin(ProtocolPlugin vProtocolPlugin)
                       throws IndexOutOfBoundsException
Parameters:
vProtocolPlugin -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addProtocolPlugin

public void addProtocolPlugin(int index,
                              ProtocolPlugin vProtocolPlugin)
                       throws IndexOutOfBoundsException
Parameters:
index -
vProtocolPlugin -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

deleteInitialSleepTime

public void deleteInitialSleepTime()

deleteMaxRescanThreadPoolSize

public void deleteMaxRescanThreadPoolSize()

deleteMaxSuspectThreadPoolSize

public void deleteMaxSuspectThreadPoolSize()

deleteRescanFrequency

public void deleteRescanFrequency()

enumerateIpManagement

public Enumeration<IpManagement> enumerateIpManagement()
Method enumerateIpManagement.

Returns:
an Enumeration over all possible elements of this collection

enumerateProtocolPlugin

public Enumeration<ProtocolPlugin> enumerateProtocolPlugin()
Method enumerateProtocolPlugin.

Returns:
an Enumeration over all possible elements of this collection

getAbortProtocolScansIfNoRoute

public String getAbortProtocolScansIfNoRoute()
Returns the value of field 'abortProtocolScansIfNoRoute'. The field 'abortProtocolScansIfNoRoute' has the following description: Flag which determines Capsd's behavior in the event that a NoRouteToHost exception is generated during a protocol plugin scan of an interface. If true, Capsd will abort the protocol scanning process for the interface.

Returns:
the value of field 'AbortProtocolScansIfNoRoute'.

getDeletePropagationEnabled

public String getDeletePropagationEnabled()
Returns the value of field 'deletePropagationEnabled'. The field 'deletePropagationEnabled' has the following description: Determine if deleting an service propagates to deleting the interface if the service is the only one remaining on the interface. Likewise for the only interface on a node.

Returns:
the value of field 'DeletePropagationEnabled'.

getInitialSleepTime

public long getInitialSleepTime()
Returns the value of field 'initialSleepTime'. The field 'initialSleepTime' has the following description: Interval (in milliseconds) between Capsd startup and the start of rescan processing.

Returns:
the value of field 'InitialSleepTime'.

getIpManagement

public IpManagement getIpManagement(int index)
                             throws IndexOutOfBoundsException
Method getIpManagement.

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

getIpManagement

public IpManagement[] getIpManagement()
Method getIpManagement.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

getIpManagementCollection

public List<IpManagement> getIpManagementCollection()
Method getIpManagementCollection.Returns a reference to '_ipManagementList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getIpManagementCount

public int getIpManagementCount()
Method getIpManagementCount.

Returns:
the size of this collection

getManagementPolicy

public String getManagementPolicy()
Returns the value of field 'managementPolicy'. The field 'managementPolicy' has the following description: Default management policy.

Returns:
the value of field 'ManagementPolicy'.

getMaxRescanThreadPoolSize

public int getMaxRescanThreadPoolSize()
Returns the value of field 'maxRescanThreadPoolSize'. The field 'maxRescanThreadPoolSize' has the following description: Maximum number of threads available for rescanning managed interfaces.

Returns:
the value of field 'MaxRescanThreadPoolSize'.

getMaxSuspectThreadPoolSize

public int getMaxSuspectThreadPoolSize()
Returns the value of field 'maxSuspectThreadPoolSize'. The field 'maxSuspectThreadPoolSize' has the following description: Maximum number of threads available for processing 'newSuspect' events from discovery.

Returns:
the value of field 'MaxSuspectThreadPoolSize'.

getProtocolPlugin

public ProtocolPlugin getProtocolPlugin(int index)
                                 throws IndexOutOfBoundsException
Method getProtocolPlugin.

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

getProtocolPlugin

public ProtocolPlugin[] getProtocolPlugin()
Method getProtocolPlugin.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

getProtocolPluginCollection

public List<ProtocolPlugin> getProtocolPluginCollection()
Method getProtocolPluginCollection.Returns a reference to '_protocolPluginList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getProtocolPluginCount

public int getProtocolPluginCount()
Method getProtocolPluginCount.

Returns:
the size of this collection

getRescanFrequency

public long getRescanFrequency()
Returns the value of field 'rescanFrequency'. The field 'rescanFrequency' has the following description: Interval (in milliseconds) between IP address re-scans.

Returns:
the value of field 'RescanFrequency'.

getSmbConfig

public SmbConfig getSmbConfig()
Returns the value of field 'smbConfig'. The field 'smbConfig' has the following description: SMB protocol configuration (primarily for SMB authentication).

Returns:
the value of field 'SmbConfig'.

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

hasInitialSleepTime

public boolean hasInitialSleepTime()
Method hasInitialSleepTime.

Returns:
true if at least one InitialSleepTime has been added

hasMaxRescanThreadPoolSize

public boolean hasMaxRescanThreadPoolSize()
Method hasMaxRescanThreadPoolSize.

Returns:
true if at least one MaxRescanThreadPoolSize has been added

hasMaxSuspectThreadPoolSize

public boolean hasMaxSuspectThreadPoolSize()
Method hasMaxSuspectThreadPoolSize.

Returns:
true if at least one MaxSuspectThreadPoolSize has been added

hasRescanFrequency

public boolean hasRescanFrequency()
Method hasRescanFrequency.

Returns:
true if at least one RescanFrequency has been added

isValid

public boolean isValid()
Method isValid.

Returns:
true if this object is valid according to the schema

iterateIpManagement

public Iterator<IpManagement> iterateIpManagement()
Method iterateIpManagement.

Returns:
an Iterator over all possible elements in this collection

iterateProtocolPlugin

public Iterator<ProtocolPlugin> iterateProtocolPlugin()
Method iterateProtocolPlugin.

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

removeAllIpManagement

public void removeAllIpManagement()

removeAllProtocolPlugin

public void removeAllProtocolPlugin()

removeIpManagement

public boolean removeIpManagement(IpManagement vIpManagement)
Method removeIpManagement.

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

removeIpManagementAt

public IpManagement removeIpManagementAt(int index)
Method removeIpManagementAt.

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

removeProtocolPlugin

public boolean removeProtocolPlugin(ProtocolPlugin vProtocolPlugin)
Method removeProtocolPlugin.

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

removeProtocolPluginAt

public ProtocolPlugin removeProtocolPluginAt(int index)
Method removeProtocolPluginAt.

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

setAbortProtocolScansIfNoRoute

public void setAbortProtocolScansIfNoRoute(String abortProtocolScansIfNoRoute)
Sets the value of field 'abortProtocolScansIfNoRoute'. The field 'abortProtocolScansIfNoRoute' has the following description: Flag which determines Capsd's behavior in the event that a NoRouteToHost exception is generated during a protocol plugin scan of an interface. If true, Capsd will abort the protocol scanning process for the interface.

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

setDeletePropagationEnabled

public void setDeletePropagationEnabled(String deletePropagationEnabled)
Sets the value of field 'deletePropagationEnabled'. The field 'deletePropagationEnabled' has the following description: Determine if deleting an service propagates to deleting the interface if the service is the only one remaining on the interface. Likewise for the only interface on a node.

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

setInitialSleepTime

public void setInitialSleepTime(long initialSleepTime)
Sets the value of field 'initialSleepTime'. The field 'initialSleepTime' has the following description: Interval (in milliseconds) between Capsd startup and the start of rescan processing.

Parameters:
initialSleepTime - the value of field 'initialSleepTime'

setIpManagement

public void setIpManagement(int index,
                            IpManagement vIpManagement)
                     throws IndexOutOfBoundsException
Parameters:
index -
vIpManagement -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setIpManagement

public void setIpManagement(IpManagement[] vIpManagementArray)
Parameters:
vIpManagementArray -

setIpManagement

public void setIpManagement(List<IpManagement> vIpManagementList)
Sets the value of '_ipManagementList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vIpManagementList - the Vector to copy.

setIpManagementCollection

public void setIpManagementCollection(List<IpManagement> ipManagementList)
Deprecated. 

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

Parameters:
ipManagementList - the Vector to set.

setManagementPolicy

public void setManagementPolicy(String managementPolicy)
Sets the value of field 'managementPolicy'. The field 'managementPolicy' has the following description: Default management policy.

Parameters:
managementPolicy - the value of field 'managementPolicy'

setMaxRescanThreadPoolSize

public void setMaxRescanThreadPoolSize(int maxRescanThreadPoolSize)
Sets the value of field 'maxRescanThreadPoolSize'. The field 'maxRescanThreadPoolSize' has the following description: Maximum number of threads available for rescanning managed interfaces.

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

setMaxSuspectThreadPoolSize

public void setMaxSuspectThreadPoolSize(int maxSuspectThreadPoolSize)
Sets the value of field 'maxSuspectThreadPoolSize'. The field 'maxSuspectThreadPoolSize' has the following description: Maximum number of threads available for processing 'newSuspect' events from discovery.

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

setProtocolPlugin

public void setProtocolPlugin(int index,
                              ProtocolPlugin vProtocolPlugin)
                       throws IndexOutOfBoundsException
Parameters:
index -
vProtocolPlugin -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setProtocolPlugin

public void setProtocolPlugin(ProtocolPlugin[] vProtocolPluginArray)
Parameters:
vProtocolPluginArray -

setProtocolPlugin

public void setProtocolPlugin(List<ProtocolPlugin> vProtocolPluginList)
Sets the value of '_protocolPluginList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vProtocolPluginList - the Vector to copy.

setProtocolPluginCollection

public void setProtocolPluginCollection(List<ProtocolPlugin> protocolPluginList)
Deprecated. 

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

Parameters:
protocolPluginList - the Vector to set.

setRescanFrequency

public void setRescanFrequency(long rescanFrequency)
Sets the value of field 'rescanFrequency'. The field 'rescanFrequency' has the following description: Interval (in milliseconds) between IP address re-scans.

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

setSmbConfig

public void setSmbConfig(SmbConfig smbConfig)
Sets the value of field 'smbConfig'. The field 'smbConfig' has the following description: SMB protocol configuration (primarily for SMB authentication).

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

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 CapsdConfiguration 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.capsd.CapsdConfiguration
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.