org.opennms.netmgt.config.trapd
Class TrapdConfiguration

java.lang.Object
  extended by org.opennms.netmgt.config.trapd.TrapdConfiguration
All Implemented Interfaces:
Serializable

public class TrapdConfiguration
extends Object
implements Serializable

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

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

Constructor Summary
TrapdConfiguration()
           
 
Method Summary
 void deleteNewSuspectOnTrap()
           
 void deleteSnmpTrapPort()
           
 boolean getNewSuspectOnTrap()
          Returns the value of field 'newSuspectOnTrap'.
 int getSnmpTrapPort()
          Returns the value of field 'snmpTrapPort'.
 boolean hasNewSuspectOnTrap()
          Method hasNewSuspectOnTrap.
 boolean hasSnmpTrapPort()
          Method hasSnmpTrapPort.
 boolean isNewSuspectOnTrap()
          Returns the value of field 'newSuspectOnTrap'.
 boolean isValid()
          Method isValid.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void setNewSuspectOnTrap(boolean newSuspectOnTrap)
          Sets the value of field 'newSuspectOnTrap'.
 void setSnmpTrapPort(int snmpTrapPort)
          Sets the value of field 'snmpTrapPort'.
static TrapdConfiguration 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

TrapdConfiguration

public TrapdConfiguration()
Method Detail

deleteNewSuspectOnTrap

public void deleteNewSuspectOnTrap()

deleteSnmpTrapPort

public void deleteSnmpTrapPort()

getNewSuspectOnTrap

public boolean getNewSuspectOnTrap()
Returns the value of field 'newSuspectOnTrap'. The field 'newSuspectOnTrap' has the following description: Whether traps from devices unknown to OpenNMS should generate newSuspect events.

Returns:
the value of field 'NewSuspectOnTrap'.

getSnmpTrapPort

public int getSnmpTrapPort()
Returns the value of field 'snmpTrapPort'. The field 'snmpTrapPort' has the following description: The port on which trapd listens for SNMP traps. The standard port is 162.

Returns:
the value of field 'SnmpTrapPort'.

hasNewSuspectOnTrap

public boolean hasNewSuspectOnTrap()
Method hasNewSuspectOnTrap.

Returns:
true if at least one NewSuspectOnTrap has been added

hasSnmpTrapPort

public boolean hasSnmpTrapPort()
Method hasSnmpTrapPort.

Returns:
true if at least one SnmpTrapPort has been added

isNewSuspectOnTrap

public boolean isNewSuspectOnTrap()
Returns the value of field 'newSuspectOnTrap'. The field 'newSuspectOnTrap' has the following description: Whether traps from devices unknown to OpenNMS should generate newSuspect events.

Returns:
the value of field 'NewSuspectOnTrap'.

isValid

public boolean isValid()
Method isValid.

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

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

setNewSuspectOnTrap

public void setNewSuspectOnTrap(boolean newSuspectOnTrap)
Sets the value of field 'newSuspectOnTrap'. The field 'newSuspectOnTrap' has the following description: Whether traps from devices unknown to OpenNMS should generate newSuspect events.

Parameters:
newSuspectOnTrap - the value of field 'newSuspectOnTrap'

setSnmpTrapPort

public void setSnmpTrapPort(int snmpTrapPort)
Sets the value of field 'snmpTrapPort'. The field 'snmpTrapPort' has the following description: The port on which trapd listens for SNMP traps. The standard port is 162.

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

unmarshal

public static TrapdConfiguration 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.trapd.TrapdConfiguration
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.