org.jsmiparser.smi
Class SmiTrapType
java.lang.Object
org.jsmiparser.smi.SmiSymbol
org.jsmiparser.smi.SmiValue
org.jsmiparser.smi.SmiTrapType
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable, Notification
public class SmiTrapType
- extends SmiValue
- implements Notification
- See Also:
- Serialized Form
|
Constructor Summary |
SmiTrapType(org.jsmiparser.util.token.IdToken idToken,
SmiModule module,
org.jsmiparser.util.token.IdToken enterpriseIdToken,
java.util.List<org.jsmiparser.util.token.IdToken> variableTokens,
java.lang.String description,
java.lang.String reference)
|
| Methods inherited from class org.jsmiparser.smi.SmiSymbol |
addUserData, compareTo, compareTo, equals, findUserData, findUserData, getFullCodeId, getId, getIdToken, getLocation, getModule, getUcId, getUserData, hashCode, setIdToken, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
SmiTrapType
public SmiTrapType(org.jsmiparser.util.token.IdToken idToken,
SmiModule module,
org.jsmiparser.util.token.IdToken enterpriseIdToken,
java.util.List<org.jsmiparser.util.token.IdToken> variableTokens,
java.lang.String description,
java.lang.String reference)
getCodeId
public java.lang.String getCodeId()
- Specified by:
getCodeId in class SmiSymbol
resolveReferences
public void resolveReferences(XRefProblemReporter reporter)
- Overrides:
resolveReferences in class SmiSymbol
getEnterpriseIdToken
public org.jsmiparser.util.token.IdToken getEnterpriseIdToken()
getEnterpriseOid
public SmiOidValue getEnterpriseOid()
getVariableTokens
public java.util.List<org.jsmiparser.util.token.IdToken> getVariableTokens()
getVariables
public java.util.List<SmiVariable> getVariables()
getObjects
public java.util.List<SmiVariable> getObjects()
- Specified by:
getObjects in interface Notification
getObjectTokens
public java.util.List<org.jsmiparser.util.token.IdToken> getObjectTokens()
- Specified by:
getObjectTokens in interface Notification
getDescription
public java.lang.String getDescription()
- Specified by:
getDescription in interface Notification
getOidStr
public java.lang.String getOidStr()
- This method is just here to implement Notification, for v1/v2 interoperability.
Ideally we would return an SmiOidValue object here, but those would essentially always
cause clashes and "duplicate OID" errors. This is because traps essentially do not
define unique OIDs, and concatenating the trap enterprise OID with the trap specific type
integer, will essentially always clash with other OBJECT-TYPE definitions in the mib file.
For instance:
- bgpVersion OBJECT-TYPE [snip] ::= { bgp 1 }
- bgpEstablished TRAP-TYPE ENTERPRISE bgp [snip] ::= 1
- Specified by:
getOidStr in interface Notification
- Returns:
- The OID in decimal dotted notation.
getReference
public java.lang.String getReference()
- Specified by:
getReference in interface Notification
getSpecificTypeToken
public org.jsmiparser.util.token.IntegerToken getSpecificTypeToken()
setSpecificTypeToken
public void setSpecificTypeToken(org.jsmiparser.util.token.IntegerToken specificTypeToken)
getSpecificType
public int getSpecificType()