public static enum SmiManager.OIDFormat extends Enum<SmiManager.OIDFormat>
OID values.| Enum Constant and Description |
|---|
Numbers
Formats the OID as dotted number string, e.g. "1.3.6.1.2.1.1.1.0" for the sysDescr object name.
|
ObjectNameAndDecodedIndex
Formats the OID as combination of object (last) name and a formatted index, e.g.
|
ObjectNameAndDecodedIndex4RoundTrip
Fully formats the OID as object (last) name of (sub)index values.
|
ObjectNameNumIndex
Formats the OID as combination of object (last) name and a numeric index, e.g.
|
| Modifier and Type | Method and Description |
|---|---|
static SmiManager.OIDFormat |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SmiManager.OIDFormat[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SmiManager.OIDFormat Numbers
OID.toString() and
OID.format() return the same formatted value.public static final SmiManager.OIDFormat ObjectNameNumIndex
sysDescr.0 or
snmpNotifyTag.102.105.108.116.101.114.101.100. This format can be used with round-trip parsing.
That is, an OID can be formatted and then parsed again using this format. This means also that
OID.toString() and OID.format() return the same formatted value.public static final SmiManager.OIDFormat ObjectNameAndDecodedIndex
sysDescr.0 or
snmpNotifyTag.filtered. This format cannot be used with round-trip parsing.
Thus, an OID cannot be formatted and then parsed again using this format. This means also that
OID.toString() and OID.format() return different values:
OID.toString() will return the same value as with {#ObjectNameNumIndex}
(snmpNotifyTag.102.105.108.116.101.114.101.100).OID.format() will instead return the fully formatted value
(e.g. snmpNotifyTag.filtered).ObjectNameAndDecodedIndex4RoundTrip instead.public static final SmiManager.OIDFormat ObjectNameAndDecodedIndex4RoundTrip
new OID("1.3.6.1.6.3.16.1.5.2.1.4.12.100.101.109.111.82.101.97.100.86.105.101.119.6.1.3.6.1.2.1").toString()
.equals("vacmViewTreeFamilyType.\"demoReadView\".\"mib-2\"") == true;new OID("vacmViewTreeFamilyMask.\"#x75:6e:00:65:73\".\"dod\"").equals(
new OID("1.3.6.1.6.3.16.1.5.2.1.3.5.117.110.0.101.115.3.1.3.6")) == true;
OID vacmAccessContextMatch = new OID("1.3.6.1.6.3.16.1.4.1.4.7.118.51.103.114.111.117.112.0.3.1");
assertEquals("vacmAccessContextMatch.\"v3group\".\"\".3.'noAuthNoPriv(1)'", vacmAccessContextMatch.toString());
assertEquals("vacmAccessContextMatch.\"v3group\".\"\".3.'noAuthNoPriv(1)'", vacmAccessContextMatch.format());
assertEquals(vacmAccessContextMatch, new OID("vacmAccessContextMatch.\"v3group\".\"\".3.'noAuthNoPriv(1)'"));
public static SmiManager.OIDFormat[] values()
for (SmiManager.OIDFormat c : SmiManager.OIDFormat.values()) System.out.println(c);
public static SmiManager.OIDFormat valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant
with the specified nameNullPointerException - if the argument is nullCopyright © 2015 SNMP4J.com. All Rights Reserved.