Package org.netxms.client.snmp
Class SnmpTrap
java.lang.Object
org.netxms.client.snmp.SnmpTrap
Object of this class represents single SNMP trap matching configuration record
-
Constructor Summary
ConstructorDescriptionSnmpTrap()
Default constructorSnmpTrap
(NXCPMessage msg) Create SNMP trap configuration object from NXCP messageSnmpTrap
(NXCPMessage msg, long baseId) Create SNMP trap configuration object from summary NXCP message -
Method Summary
Modifier and TypeMethodDescriptionvoid
fillMessage
(NXCPMessage msg) Fill NXCP message with trap configuration data.int
Get event tag to be added when generating NetXMS event.long
getId()
Get trap transformation script.void
setDescription
(String description) void
setEventCode
(int eventCode) void
setEventTag
(String eventTag) Set event tag to be added when generating NetXMS event.void
setId
(long id) void
setObjectId
(SnmpObjectId objectId) void
setTransformationScript
(String transformationScript) Set trap transformation script.
-
Constructor Details
-
SnmpTrap
public SnmpTrap()Default constructor -
SnmpTrap
Create SNMP trap configuration object from NXCP message- Parameters:
msg
- NXCP message
-
SnmpTrap
Create SNMP trap configuration object from summary NXCP message- Parameters:
msg
- NXCP messagebaseId
- base field ID
-
-
Method Details
-
fillMessage
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
- Returns:
- the description
-
setDescription
- Parameters:
description
- the description to set
-
getObjectId
- Returns:
- the objectId
-
setObjectId
- 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
Get event tag to be added when generating NetXMS event.- Returns:
- event tag to be added when generating NetXMS event.
-
setEventTag
Set event tag to be added when generating NetXMS event.- Parameters:
eventTag
- event tag to be added when generating NetXMS event
-
getTransformationScript
Get trap transformation script.- Returns:
- trap transformation script
-
setTransformationScript
Set trap transformation script.- Parameters:
transformationScript
- trap transformation script
-
getParameterMapping
- Returns:
- the parameterMapping
-