Package org.netxms.client.snmp
Class SnmpTrap
- java.lang.Object
-
- org.netxms.client.snmp.SnmpTrap
-
public class SnmpTrap extends Object
Object of this class represents single SNMP trap matching configuration record
-
-
Constructor Summary
Constructors Constructor Description SnmpTrap()Default constructorSnmpTrap(org.netxms.base.NXCPMessage msg)Create SNMP trap configuration object from NXCP messageSnmpTrap(org.netxms.base.NXCPMessage msg, long baseId)Create SNMP trap configuration object from summary NXCP message
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfillMessage(org.netxms.base.NXCPMessage msg)Fill NXCP message with trap configuration data.StringgetDescription()intgetEventCode()StringgetEventTag()Get event tag to be added when generating NetXMS event.longgetId()SnmpObjectIdgetObjectId()List<SnmpTrapParameterMapping>getParameterMapping()StringgetTransformationScript()Get trap transformation script.voidsetDescription(String description)voidsetEventCode(int eventCode)voidsetEventTag(String eventTag)Set event tag to be added when generating NetXMS event.voidsetId(long id)voidsetObjectId(SnmpObjectId objectId)voidsetTransformationScript(String transformationScript)Set trap transformation script.
-
-
-
Constructor Detail
-
SnmpTrap
public SnmpTrap()
Default constructor
-
SnmpTrap
public SnmpTrap(org.netxms.base.NXCPMessage msg)
Create SNMP trap configuration object from NXCP message- Parameters:
msg- NXCP message
-
SnmpTrap
public SnmpTrap(org.netxms.base.NXCPMessage msg, long baseId)Create SNMP trap configuration object from summary NXCP message- Parameters:
msg- NXCP message
-
-
Method Detail
-
fillMessage
public void fillMessage(org.netxms.base.NXCPMessage msg)
Fill NXCP message with trap configuration data.- Parameters:
msg- NXCP message
-
getId
public long getId()
- Returns:
- the id
-
setId
public void setId(long id)
- Parameters:
id- the id to set
-
getDescription
public String getDescription()
- Returns:
- the description
-
setDescription
public void setDescription(String description)
- Parameters:
description- the description to set
-
getObjectId
public SnmpObjectId getObjectId()
- Returns:
- the objectId
-
setObjectId
public void setObjectId(SnmpObjectId objectId)
- Parameters:
objectId- the objectId to set
-
getEventCode
public int getEventCode()
- Returns:
- the eventCode
-
setEventCode
public void setEventCode(int eventCode)
- Parameters:
eventCode- the eventCode to set
-
getEventTag
public String getEventTag()
Get event tag to be added when generating NetXMS event.- Returns:
- event tag to be added when generating NetXMS event.
-
setEventTag
public void setEventTag(String eventTag)
Set event tag to be added when generating NetXMS event.- Parameters:
eventTag- event tag to be added when generating NetXMS event
-
getTransformationScript
public String getTransformationScript()
Get trap transformation script.- Returns:
- trap transformation script
-
setTransformationScript
public void setTransformationScript(String transformationScript)
Set trap transformation script.- Parameters:
transformationScript- trap transformation script
-
getParameterMapping
public List<SnmpTrapParameterMapping> getParameterMapping()
- Returns:
- the parameterMapping
-
-