Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
DefaultDataMapTrapMapping |
|
| 1.3333333333333333;1,333 |
1 | package net.sf.snmpadaptor4j.core.mapping; | |
2 | ||
3 | import net.sf.snmpadaptor4j.object.SnmpOid; | |
4 | ||
5 | /** | |
6 | * Object containing the <b>default mapping</b> to build the <code>dataMap</code> field of {@link net.sf.snmpadaptor4j.object.SnmpTrap SnmpTrap} from a JMX | |
7 | * notification. | |
8 | * @author <a href="http://fr.linkedin.com/in/jpminetti/">Jean-Philippe MINETTI</a> | |
9 | */ | |
10 | public final class DefaultDataMapTrapMapping | |
11 | extends DataMapTrapMapping { | |
12 | ||
13 | /** | |
14 | * Serial number. | |
15 | */ | |
16 | private static final long serialVersionUID = -5496101012219041389L; | |
17 | ||
18 | /** | |
19 | * Hidden constructor. | |
20 | * @param sequenceNumberOid OID of <code>sequenceNumber</code> field of JMX notification. Is NULL if the <code>sequenceNumber</code> should not be present in | |
21 | * <code>dataMap</code> field of {@link net.sf.snmpadaptor4j.object.SnmpTrap SnmpTrap}. | |
22 | * @param messageOid OID of <code>message</code> field of JMX notification. Is NULL if the <code>message</code> should not be present in <code>dataMap</code> | |
23 | * field of {@link net.sf.snmpadaptor4j.object.SnmpTrap SnmpTrap}. | |
24 | * @param hasSystemInfo <code>TRUE</code> for put all system information attributes in the <code>dataMap</code> field of | |
25 | * {@link net.sf.snmpadaptor4j.object.SnmpTrap SnmpTrap}. | |
26 | * @see XmlMappingParser#newSnmpTrapMappingMap(String) | |
27 | */ | |
28 | DefaultDataMapTrapMapping (final SnmpOid sequenceNumberOid, final SnmpOid messageOid, final boolean hasSystemInfo) { | |
29 | 84 | super(sequenceNumberOid, messageOid, hasSystemInfo); |
30 | 84 | } |
31 | ||
32 | /* | |
33 | * {@inheritDoc} | |
34 | * @see net.sf.snmpadaptor4j.core.mapping.DataMapTrapMapping#equals(java.lang.Object) | |
35 | */ | |
36 | @Override | |
37 | public boolean equals (final Object obj) { | |
38 | 44 | boolean result = false; |
39 | 44 | if (obj == this) { |
40 | 7 | result = true; |
41 | } | |
42 | else { | |
43 | 37 | result = super.equals(obj); |
44 | } | |
45 | 44 | return result; |
46 | } | |
47 | ||
48 | /* | |
49 | * {@inheritDoc} | |
50 | * @see java.lang.Object#toString() | |
51 | */ | |
52 | @Override | |
53 | public String toString () { | |
54 | 1 | return "DefaultDataMapTrapMapping[sequenceNumberOid=" + getSequenceNumberOid() + "; messageOid=" + getMessageOid() + "; hasSystemInfo=" + isHasSystemInfo() |
55 | + "]"; | |
56 | } | |
57 | ||
58 | } |