Package org.opennms.netmgt.config.trapd
Class TrapdConfiguration
- java.lang.Object
-
- org.opennms.netmgt.config.trapd.TrapdConfiguration
-
- All Implemented Interfaces:
java.io.Serializable
public class TrapdConfiguration extends java.lang.Object implements java.io.Serializable
Top-level element for the trapd-configuration.xml configuration file.- Version:
- $Revision$ $Date$
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
DEFAULT_USE_ADDESS_FROM_VARBIND
-
Constructor Summary
Constructors Constructor Description TrapdConfiguration()
TrapdConfiguration(int _snmpTrapPort, java.lang.String snmpTrapAddress)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addSnmpv3User(int index, Snmpv3User vSnmpv3User)
void
addSnmpv3User(Snmpv3User vSnmpv3User)
void
deleteNewSuspectOnTrap()
void
deleteSnmpTrapPort()
java.util.Enumeration<Snmpv3User>
enumerateSnmpv3User()
Method enumerateSnmpv3User.boolean
equals(java.lang.Object obj)
int
getBatchInterval()
int
getBatchSize()
boolean
getNewSuspectOnTrap()
Returns the value of field 'newSuspectOnTrap'.int
getQueueSize()
java.lang.String
getSnmpTrapAddress()
Returns the value of field 'snmpTrapAddress'.int
getSnmpTrapPort()
Returns the value of field 'snmpTrapPort'.Snmpv3User[]
getSnmpv3User()
Method getSnmpv3User.Returns the contents of the collection in an Array.Snmpv3User
getSnmpv3User(int index)
Method getSnmpv3User.java.util.List<Snmpv3User>
getSnmpv3UserCollection()
Method getSnmpv3UserCollection.Returns a reference to '_snmpv3UserList'.int
getSnmpv3UserCount()
Method getSnmpv3UserCount.int
getThreads()
int
hashCode()
boolean
hasNewSuspectOnTrap()
Method hasNewSuspectOnTrap.boolean
hasSnmpTrapPort()
Method hasSnmpTrapPort.boolean
isIncludeRawMessage()
boolean
isNewSuspectOnTrap()
Returns the value of field 'newSuspectOnTrap'.java.util.Iterator<Snmpv3User>
iterateSnmpv3User()
Method iterateSnmpv3User.void
removeAllSnmpv3User()
boolean
removeSnmpv3User(Snmpv3User vSnmpv3User)
Method removeSnmpv3User.Snmpv3User
removeSnmpv3UserAt(int index)
Method removeSnmpv3UserAt.void
setBatchInterval(int _batchInterval)
void
setBatchSize(int _batchSize)
void
setIncludeRawMessage(boolean _includeRawMessage)
void
setNewSuspectOnTrap(boolean newSuspectOnTrap)
Sets the value of field 'newSuspectOnTrap'.void
setQueueSize(int _queueSize)
void
setSnmpTrapAddress(java.lang.String snmpTrapAddress)
Sets the value of field 'snmpTrapAddress'.void
setSnmpTrapPort(int snmpTrapPort)
Sets the value of field 'snmpTrapPort'.void
setSnmpv3User(int index, Snmpv3User vSnmpv3User)
void
setSnmpv3User(java.util.List<Snmpv3User> vSnmpv3UserList)
Sets the value of '_snmpv3UserList' by copying the given Vector.void
setSnmpv3User(Snmpv3User[] vSnmpv3UserArray)
void
setSnmpv3UserCollection(java.util.List<Snmpv3User> snmpv3UserList)
Deprecated.void
setThreads(int _threads)
void
setUseAddressFromVarbind(java.lang.Boolean useAddessFromVarbind)
boolean
shouldUseAddressFromVarbind()
-
-
-
Field Detail
-
DEFAULT_USE_ADDESS_FROM_VARBIND
public static final boolean DEFAULT_USE_ADDESS_FROM_VARBIND
- See Also:
- Constant Field Values
-
-
Method Detail
-
addSnmpv3User
public void addSnmpv3User(Snmpv3User vSnmpv3User) throws java.lang.IndexOutOfBoundsException
- Parameters:
vSnmpv3User
-- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
addSnmpv3User
public void addSnmpv3User(int index, Snmpv3User vSnmpv3User) throws java.lang.IndexOutOfBoundsException
- Parameters:
index
-vSnmpv3User
-- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
deleteNewSuspectOnTrap
public void deleteNewSuspectOnTrap()
-
deleteSnmpTrapPort
public void deleteSnmpTrapPort()
-
enumerateSnmpv3User
public java.util.Enumeration<Snmpv3User> enumerateSnmpv3User()
Method enumerateSnmpv3User.- Returns:
- an Enumeration over all possible elements of this collection
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
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'.
-
getSnmpTrapAddress
public java.lang.String getSnmpTrapAddress()
Returns the value of field 'snmpTrapAddress'. The field 'snmpTrapAddress' has the following description: The IP address on which trapd listens for connections. If "" is specified, trapd will bind to all addresses. The default is .- Returns:
- the value of field 'SnmpTrapAddress'.
-
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'.
-
getSnmpv3User
public Snmpv3User getSnmpv3User(int index) throws java.lang.IndexOutOfBoundsException
Method getSnmpv3User.- Parameters:
index
-- Returns:
- the value of the Snmpv3User at the given index
- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
getSnmpv3User
public Snmpv3User[] getSnmpv3User()
Method getSnmpv3User.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
-
getSnmpv3UserCollection
public java.util.List<Snmpv3User> getSnmpv3UserCollection()
Method getSnmpv3UserCollection.Returns a reference to '_snmpv3UserList'. No type checking is performed on any modifications to the Vector.- Returns:
- a reference to the Vector backing this class
-
getSnmpv3UserCount
public int getSnmpv3UserCount()
Method getSnmpv3UserCount.- Returns:
- the size of this collection
-
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'.
-
shouldUseAddressFromVarbind
public boolean shouldUseAddressFromVarbind()
-
setUseAddressFromVarbind
public void setUseAddressFromVarbind(java.lang.Boolean useAddessFromVarbind)
-
iterateSnmpv3User
public java.util.Iterator<Snmpv3User> iterateSnmpv3User()
Method iterateSnmpv3User.- Returns:
- an Iterator over all possible elements in this collection
-
removeAllSnmpv3User
public void removeAllSnmpv3User()
-
removeSnmpv3User
public boolean removeSnmpv3User(Snmpv3User vSnmpv3User)
Method removeSnmpv3User.- Parameters:
vSnmpv3User
-- Returns:
- true if the object was removed from the collection.
-
removeSnmpv3UserAt
public Snmpv3User removeSnmpv3UserAt(int index)
Method removeSnmpv3UserAt.- Parameters:
index
-- Returns:
- the element removed from the collection
-
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'
-
setSnmpTrapAddress
public void setSnmpTrapAddress(java.lang.String snmpTrapAddress)
Sets the value of field 'snmpTrapAddress'. The field 'snmpTrapAddress' has the following description: The IP address on which trapd listens for connections. If "" is specified, trapd will bind to all addresses. The default is .- Parameters:
snmpTrapAddress
- the value of field 'snmpTrapAddress'.
-
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'.
-
setSnmpv3User
public void setSnmpv3User(int index, Snmpv3User vSnmpv3User) throws java.lang.IndexOutOfBoundsException
- Parameters:
index
-vSnmpv3User
-- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
setSnmpv3User
public void setSnmpv3User(Snmpv3User[] vSnmpv3UserArray)
- Parameters:
vSnmpv3UserArray
-
-
setSnmpv3User
public void setSnmpv3User(java.util.List<Snmpv3User> vSnmpv3UserList)
Sets the value of '_snmpv3UserList' by copying the given Vector. All elements will be checked for type safety.- Parameters:
vSnmpv3UserList
- the Vector to copy.
-
setSnmpv3UserCollection
public void setSnmpv3UserCollection(java.util.List<Snmpv3User> snmpv3UserList)
Deprecated.Sets the value of '_snmpv3UserList' by setting it to the given Vector. No type checking is performed.- Parameters:
snmpv3UserList
- the Vector to set.
-
isIncludeRawMessage
public boolean isIncludeRawMessage()
-
setIncludeRawMessage
public void setIncludeRawMessage(boolean _includeRawMessage)
-
getThreads
public int getThreads()
-
setThreads
public void setThreads(int _threads)
-
getQueueSize
public int getQueueSize()
-
setQueueSize
public void setQueueSize(int _queueSize)
-
getBatchSize
public int getBatchSize()
-
setBatchSize
public void setBatchSize(int _batchSize)
-
getBatchInterval
public int getBatchInterval()
-
setBatchInterval
public void setBatchInterval(int _batchInterval)
-
-