Package org.opennms.netmgt.trapd
Class TrapdConfigBean
- java.lang.Object
-
- org.opennms.netmgt.trapd.TrapdConfigBean
-
- All Implemented Interfaces:
Serializable,TrapdConfig
public class TrapdConfigBean extends Object implements TrapdConfig, Serializable
This is a bean container that can be used as aTrapdConfigservice.- 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 intgetBatchIntervalMs()Messages are aggregated in batches before being dispatched.intgetBatchSize()Messages are aggregated in batches before being dispatched.booleangetNewSuspectOnTrap()Whether or not a newSuspect event should be generated with a trap from an unknown IP addressintgetNumThreads()Number of threads used for consuming/dispatching messages.intgetQueueSize()Maximum number of messages to keep in memory while waiting to be dispatched.StringgetSnmpTrapAddress()intgetSnmpTrapPort()List<SnmpV3User>getSnmpV3Users()booleanisIncludeRawMessage()voidsetBatchIntervalMs(int batchIntervalInMs)voidsetBatchSize(int batchSize)voidsetIncludeRawMessage(boolean includeRawMessage)voidsetNewSuspectOnTrap(boolean newSuspectOnTrap)voidsetNumThreads(int numThreads)voidsetQueueSize(int queueSize)voidsetSnmpTrapAddress(String snmpTrapAddress)voidsetSnmpTrapPort(int snmpTrapPort)voidsetSnmpV3Users(List<SnmpV3User> snmpV3Users)voidsetUseAddressFromVarbind(boolean useAddressFromVarbind)booleanshouldUseAddressFromVarbind()static SnmpV3UsertoSnmpV3User(Snmpv3User snmpv3User)voidupdate(TrapdConfig config)
-
-
-
Constructor Detail
-
TrapdConfigBean
public TrapdConfigBean()
-
TrapdConfigBean
public TrapdConfigBean(TrapdConfig configToClone)
-
TrapdConfigBean
public TrapdConfigBean(TrapdConfiguration trapdConfiguration)
-
-
Method Detail
-
setSnmpTrapAddress
public void setSnmpTrapAddress(String snmpTrapAddress)
-
setSnmpTrapPort
public void setSnmpTrapPort(int snmpTrapPort)
-
setNewSuspectOnTrap
public void setNewSuspectOnTrap(boolean newSuspectOnTrap)
-
getSnmpTrapAddress
public String getSnmpTrapAddress()
- Specified by:
getSnmpTrapAddressin interfaceTrapdConfig
-
getSnmpTrapPort
public int getSnmpTrapPort()
- Specified by:
getSnmpTrapPortin interfaceTrapdConfig
-
setSnmpV3Users
public void setSnmpV3Users(List<SnmpV3User> snmpV3Users)
-
getNewSuspectOnTrap
public boolean getNewSuspectOnTrap()
Description copied from interface:TrapdConfigWhether or not a newSuspect event should be generated with a trap from an unknown IP address- Specified by:
getNewSuspectOnTrapin interfaceTrapdConfig
-
getSnmpV3Users
public List<SnmpV3User> getSnmpV3Users()
- Specified by:
getSnmpV3Usersin interfaceTrapdConfig
-
isIncludeRawMessage
public boolean isIncludeRawMessage()
- Specified by:
isIncludeRawMessagein interfaceTrapdConfig
-
setIncludeRawMessage
public void setIncludeRawMessage(boolean includeRawMessage)
-
getNumThreads
public int getNumThreads()
Description copied from interface:TrapdConfigNumber of threads used for consuming/dispatching messages.- Specified by:
getNumThreadsin interfaceTrapdConfig- Returns:
- number of threads
-
getQueueSize
public int getQueueSize()
Description copied from interface:TrapdConfigMaximum number of messages to keep in memory while waiting to be dispatched.- Specified by:
getQueueSizein interfaceTrapdConfig- Returns:
- queue size
-
getBatchSize
public int getBatchSize()
Description copied from interface:TrapdConfigMessages are aggregated in batches before being dispatched. When the batch reaches this size, it will be dispatched.- Specified by:
getBatchSizein interfaceTrapdConfig- Returns:
- batch size
-
getBatchIntervalMs
public int getBatchIntervalMs()
Description copied from interface:TrapdConfigMessages 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:
getBatchIntervalMsin interfaceTrapdConfig- Returns:
- interval in ms
-
update
public void update(TrapdConfig config)
- Specified by:
updatein 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:
shouldUseAddressFromVarbindin interfaceTrapdConfig
-
setUseAddressFromVarbind
public void setUseAddressFromVarbind(boolean useAddressFromVarbind)
-
-