org.snmp4j.agent.mo.snmp.tc
Interface TextualConvention

All Known Implementing Classes:
AutonomousTypeTC, DateAndTimeTC, DisplayStringTC, NotificationLogMib.SnmpAdminString, NotificationLogMib.SnmpEngineID, NotificationLogMib.TAddress, NotificationLogMib.TDomain, RowStatusTC, Snmp4jProxyMib.SnmpAdminString, Snmp4jProxyMib.SnmpEngineID, SnmpTlsTmMib.SnmpAdminString, SnmpTlsTmMib.SnmpTLSFingerprint, StorageTypeTC, TestAndIncrTC, TimeStampTC, TruthValueTC

public interface TextualConvention

The TextualConvention interface defines the common properties of SMI textual conventions needed to use them across different MIB modules within an agent implementation.

A textual convention is characterized by its name and the MIB module name where it has been defined. With these attributes a TC registry is able to lookup TC implementations by name.

A MOFactory can then use a TC name to lookup its implementation and then use one of the two factory methods of each TC to create either a scalar or columnar ManagedObject instance.

If you need to use your own TC implementations (either replacing/extending already provided ones or adding new ones) then register them to the MOFactory you are using.

Version:
1.3
Author:
Frank Fock

Method Summary
 MOColumn createColumn(int columnID, int syntax, MOAccess access, org.snmp4j.smi.Variable defaultValue, boolean mutableInService)
          Creates a MOColumn instance of this TC specified by the column ID, access, default value, and mutable flag.
 org.snmp4j.smi.Variable createInitialValue()
          Creates an initial value for an object instance of this textual convention.
 MOScalar createScalar(org.snmp4j.smi.OID oid, MOAccess access, org.snmp4j.smi.Variable value)
          Creates a MOScalar instance of this TC specified by OID, access, and optional value.
 java.lang.String getModuleName()
          Returns the MIB module name that defined this textual convention.
 java.lang.String getName()
          Returns the name of the textual convention as defined in the MIB module.
 

Method Detail

getModuleName

java.lang.String getModuleName()
Returns the MIB module name that defined this textual convention.

Returns:
an unique module name

getName

java.lang.String getName()
Returns the name of the textual convention as defined in the MIB module.

Returns:
the unique name (within the MIB module) of the TC.

createScalar

MOScalar createScalar(org.snmp4j.smi.OID oid,
                      MOAccess access,
                      org.snmp4j.smi.Variable value)
Creates a MOScalar instance of this TC specified by OID, access, and optional value.

Parameters:
oid - the OID of the scalar isntance.
access - the access definition.
value - the Variable instance containing the value of the scalar. If value is null, the TC should create an initial value with createInitialValue().
Returns:
a MOScalar instance.

createColumn

MOColumn createColumn(int columnID,
                      int syntax,
                      MOAccess access,
                      org.snmp4j.smi.Variable defaultValue,
                      boolean mutableInService)
Creates a MOColumn instance of this TC specified by the column ID, access, default value, and mutable flag.

Parameters:
columnID - the column id as defined in the MIB module (typically starting at one).
access - the access definition.
defaultValue - the default value or null if there is no DEFVAL clause for this column.
mutableInService - true if this column may be modified while row is in service.
Returns:
the MOColumn created.

createInitialValue

org.snmp4j.smi.Variable createInitialValue()
Creates an initial value for an object instance of this textual convention.

Returns:
a Variable instance with a valid value (according to this TC).
Since:
1.3

Copyright 2005-2010 Frank Fock (SNMP4J.org)

Copyright © 2011 SNMP4J.org. All Rights Reserved.