Package org.opennms.netmgt.trapd
Class TrapdConfigBean
- java.lang.Object
-
- org.opennms.netmgt.trapd.TrapdConfigBean
-
- All Implemented Interfaces:
java.io.Serializable
,TrapdConfig
public class TrapdConfigBean extends java.lang.Object implements TrapdConfig, java.io.Serializable
This is a bean container that can be used as aTrapdConfig
service.- Author:
- dp044946
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TrapdConfigBean()
TrapdConfigBean(TrapdConfiguration trapdConfiguration)
TrapdConfigBean(TrapdConfig configToClone)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getBatchIntervalMs()
Messages are aggregated in batches before being dispatched.int
getBatchSize()
Messages are aggregated in batches before being dispatched.boolean
getNewSuspectOnTrap()
Whether or not a newSuspect event should be generated with a trap from an unknown IP addressint
getNumThreads()
Number of threads used for consuming/dispatching messages.int
getQueueSize()
Maximum number of messages to keep in memory while waiting to be dispatched.java.lang.String
getSnmpTrapAddress()
int
getSnmpTrapPort()
java.util.List<SnmpV3User>
getSnmpV3Users()
boolean
isIncludeRawMessage()
void
setBatchIntervalMs(int batchIntervalInMs)
void
setBatchSize(int batchSize)
void
setIncludeRawMessage(boolean includeRawMessage)
void
setNewSuspectOnTrap(boolean newSuspectOnTrap)
void
setNumThreads(int numThreads)
void
setQueueSize(int queueSize)
void
setSnmpTrapAddress(java.lang.String snmpTrapAddress)
void
setSnmpTrapPort(int snmpTrapPort)
void
setSnmpV3Users(java.util.List<SnmpV3User> snmpV3Users)
void
setUseAddressFromVarbind(boolean useAddressFromVarbind)
boolean
shouldUseAddressFromVarbind()
static SnmpV3User
toSnmpV3User(Snmpv3User snmpv3User)
void
update(TrapdConfig config)
-
-
-
Constructor Detail
-
TrapdConfigBean
public TrapdConfigBean()
-
TrapdConfigBean
public TrapdConfigBean(TrapdConfig configToClone)
-
TrapdConfigBean
public TrapdConfigBean(TrapdConfiguration trapdConfiguration)
-
-
Method Detail
-
setSnmpTrapAddress
public void setSnmpTrapAddress(java.lang.String snmpTrapAddress)
-
setSnmpTrapPort
public void setSnmpTrapPort(int snmpTrapPort)
-
setNewSuspectOnTrap
public void setNewSuspectOnTrap(boolean newSuspectOnTrap)
-
getSnmpTrapAddress
public java.lang.String getSnmpTrapAddress()
- Specified by:
getSnmpTrapAddress
in interfaceTrapdConfig
-
getSnmpTrapPort
public int getSnmpTrapPort()
- Specified by:
getSnmpTrapPort
in interfaceTrapdConfig
-
setSnmpV3Users
public void setSnmpV3Users(java.util.List<SnmpV3User> snmpV3Users)
-
getNewSuspectOnTrap
public boolean getNewSuspectOnTrap()
Description copied from interface:TrapdConfig
Whether or not a newSuspect event should be generated with a trap from an unknown IP address- Specified by:
getNewSuspectOnTrap
in interfaceTrapdConfig
-
getSnmpV3Users
public java.util.List<SnmpV3User> getSnmpV3Users()
- Specified by:
getSnmpV3Users
in interfaceTrapdConfig
-
isIncludeRawMessage
public boolean isIncludeRawMessage()
- Specified by:
isIncludeRawMessage
in interfaceTrapdConfig
-
setIncludeRawMessage
public void setIncludeRawMessage(boolean includeRawMessage)
-
getNumThreads
public int getNumThreads()
Description copied from interface:TrapdConfig
Number of threads used for consuming/dispatching messages.- Specified by:
getNumThreads
in interfaceTrapdConfig
- Returns:
- number of threads
-
getQueueSize
public int getQueueSize()
Description copied from interface:TrapdConfig
Maximum number of messages to keep in memory while waiting to be dispatched.- Specified by:
getQueueSize
in interfaceTrapdConfig
- Returns:
- queue size
-
getBatchSize
public int getBatchSize()
Description copied from interface:TrapdConfig
Messages are aggregated in batches before being dispatched. When the batch reaches this size, it will be dispatched.- Specified by:
getBatchSize
in interfaceTrapdConfig
- Returns:
- batch size
-
getBatchIntervalMs
public int getBatchIntervalMs()
Description copied from interface:TrapdConfig
Messages are aggregated in batches before being dispatched. When the batch has been created for longer than this interval it will be dispatched, regardless of the size.- Specified by:
getBatchIntervalMs
in interfaceTrapdConfig
- Returns:
- interval in ms
-
update
public void update(TrapdConfig config)
- Specified by:
update
in interfaceTrapdConfig
-
setBatchIntervalMs
public void setBatchIntervalMs(int batchIntervalInMs)
-
setBatchSize
public void setBatchSize(int batchSize)
-
setQueueSize
public void setQueueSize(int queueSize)
-
setNumThreads
public void setNumThreads(int numThreads)
-
toSnmpV3User
public static SnmpV3User toSnmpV3User(Snmpv3User snmpv3User)
-
shouldUseAddressFromVarbind
public boolean shouldUseAddressFromVarbind()
- Specified by:
shouldUseAddressFromVarbind
in interfaceTrapdConfig
-
setUseAddressFromVarbind
public void setUseAddressFromVarbind(boolean useAddressFromVarbind)
-
-