com.adventnet.snmp.mibs
Class ACVariation

java.lang.Object
  |
  +--com.adventnet.snmp.mibs.ACVariation
All Implemented Interfaces:
java.io.Serializable

public class ACVariation
extends java.lang.Object
implements java.io.Serializable

This class represents the VARIATIONS within the module of AGENT-CAPABILITIES which contains the informations like

The variation can be a NotificationVariation or ObjectVariation

The NotificationVariation is defined as follows

 VARIATION    <notificationName>
 [ACCESS      <AccessV2>]
 DESCRIPTION  <Text> 
 
where
<notificationName> is the name of the Notification
<AccessV2> is the SMIv2 access value
<Text> is a character String enclosed within double quotes.

The ObjectVariation is defined as follows,

 VARIATION            <ObjectName>
 [SYNTAX              <SyntaxV2>]
 [WRITE SYNTAX        <SyntaxV2]
 [ACCESS              <AccessV2] 
 [CREATION-REQUIRES   { <Objects> }]
 [DEFVAL              { <Defval> }]
 DESCRIPTION          <Text> 
 
where
<ObjectName> is the name of the scalar or columnar object.
<SyntaxV2> is the SMIv2 syntax.
<AccessV2> is the SMIV2 access value.
<Objects> is one or more scalar or columnar objects name. Multiple objects are seperated by comma.
<Defval> is a default value which matches the syntax.
<Text> is a character String enclosed within double quotes.

The ACVariation instance can be obtained as follows after loading the MIB. The MIB should contain the AGENT-CAPABILITIES macro with the variations.

 MibModule mod = mibops.getMibModule("moduleName");
 AgentCapabilities ac = mod.getAgentCapabilities("AgentCapabilitiesName");
 Vector acVect = ac.getACModules();
 AgentCapabilitiesModule acm = (AgentCapabilitiesModule)acVect.elementAt(0);
 Vector varVect = acm.getACVariations();
 ACVariation acv = (ACVariation)varVect.elementAt(0);
 

See Also:
Serialized Form

Method Summary
 int getAccess()
          Gets the implemented ACCESS value for this Variation.
 java.util.Vector getCreationObjects()
          Returns the value of CREATION-REQUIRES field for this Variation.
 java.lang.String getDefVal()
          Returns the default value for this Variation.
 java.lang.String getDescription()
          Gets the DESCRIPTION string for this Variation.
 java.lang.String getName()
          Gets the name of the variation.
 LeafSyntax getSyntax()
          Returns the SYNTAX value of this Variation.
 LeafSyntax getWriteSyntax()
          Returns the WRITE-SYNTAX value of this Variation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public java.lang.String getName()
Gets the name of the variation. The VRAITAION clause is used for specifying the change or behaviour of an event or an object or to specify an non implemented event or a non implemented object.

Returns:
the value of VARIATION clause.

getSyntax

public LeafSyntax getSyntax()
Returns the SYNTAX value of this Variation.

Returns:
the value of SYNTAX clause as LeafSyntax object, if present
else, returns null.

getWriteSyntax

public LeafSyntax getWriteSyntax()
Returns the WRITE-SYNTAX value of this Variation.

Returns:
the value of WRITE-SYNTAX clause as LeafSyntax object, if present
else, returns null.

getAccess

public int getAccess()
Gets the implemented ACCESS value for this Variation.

Returns:
int - the value of the ACCESS clause, if present
else return -1.

getCreationObjects

public java.util.Vector getCreationObjects()
Returns the value of CREATION-REQUIRES field for this Variation.

Returns:
the Vector - the elements of the Vector are the values specified in the CREATION-REQUIRES clause, if present.
else empty Vector.

getDefVal

public java.lang.String getDefVal()
Returns the default value for this Variation.

Returns:
String - the value of the DEFVAL clause. if present.
else empty String.

getDescription

public java.lang.String getDescription()
Gets the DESCRIPTION string for this Variation.

Returns:
String - the value of the DESCRIPTION clause


Copyright (c)AdventNet Inc., 1996-2006