com.adventnet.snmp.mibs
Class AgentCapabilitiesModule

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

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

This class represents the implementation specification in an AGENT-CAPABILITIES macro. This class contains information about the SUPPORTS and INCLUDES clause in the AGENT-CAPABILITIES macro. In addition to that, this class contains the reference of the AcVariation object which corresponds to the Event variation or Object Variation. An AgentCapabilties Module contains the following definition

 SUPPORTS <moduleIdentifier>
 INCLUDES { <groups> }
 [<variations>]*
 
where
<moduleIdentifier> is the name of module.
<groups> is one or more object(s) or event group(s). Each object or event group is seperated by a comma.
<variations> is the event variation or object variations which corresponds to the class ACVariation. There can be one or more variations.

The AgentCapabiltiesModule instance can be obtained using any one of following methods after loading the MIB containing the AGENT-CAPABILITIES macro.

 MibOperations mibOps = new MibOperations();
 try
 {
  mibOps.loadMibModules("mibFile");
 }
 catch(Exception ex)
 {
  System.out.println(ex);
 }
 

Method 1 MibModule mod = mibops.getMibModule("moduleName"); AgentCapabilities ac = mod.getAgentCapabilities("AgentCapabilitiesName"); Vector acVect = ac.getACModules(); AgentCapabilitiesModule acm = (AgentCapabilitiesModule)acVect.elementAt(0);

Method 2 MibModule mod = mibops.getMibModule("moduleName"); Enumeration en = mod.getDefinedAgentCapabilities(); while(en.hasMoreElements()) { AgentCapabilities ac = (AgentCapabilities)en.nextElement(); Vector acVect = ac.getACModules(); AgentCapabilitiesModule acm = (AgentCapabilitiesModule)acVect.elementAt(0); }

See Also:
Serialized Form

Method Summary
 java.util.Vector getAccess()
          Deprecated. Since 3.0. Instead you can use getAccess() in ACVariation class.
 java.util.Vector getACVariations()
          Gets the variations implemented by the AGENT-CAPABILITIES module.
 java.util.Vector getCreationRequires()
          Deprecated. Since 3.0. Instead you can use getCreationObjects() in ACVariation class.
 java.util.Vector getDefval()
          Deprecated. Since 3.0. Instead you can use getDefVal() in ACVariation class.
 java.lang.String getIncludes()
          Gets the groups supported by this AgentCapabilties Module.
 java.lang.String getSupports()
          Gets the name of the module that is being supported.
 java.util.Vector getSyntax()
          Deprecated. Since 3.0. Instead you can use getSyntax() in ACVariation class
 java.util.Vector getVariation()
          Deprecated. Since 3.0
 java.util.Vector getVariationDescription()
          Deprecated. Since 3.0. Instead you can use getDescription() in ACVariation class.
 java.util.Vector getWriteSyntax()
          Deprecated. Since 3.0. Instead you can use getWriteSyntax() in ACVariation class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getIncludes

public java.lang.String getIncludes()
Gets the groups supported by this AgentCapabilties Module. The INCLUDES clause specifies objects or event groups implemented by an agent.

Returns:
the value in the INCLUDES field.

getVariation

public java.util.Vector getVariation()
Deprecated. Since 3.0

Returns a Vector of the VARIATION clause.


getACVariations

public java.util.Vector getACVariations()
Gets the variations implemented by the AGENT-CAPABILITIES module. The VARIATIONS clause is used to specify the change of behaviour of an event or to specify the non implemented event.

Returns:
a Vector of ACVariation objects.

getSupports

public java.lang.String getSupports()
Gets the name of the module that is being supported.

Returns:
the value in the SUPPORTS field.

getSyntax

public java.util.Vector getSyntax()
Deprecated. Since 3.0. Instead you can use getSyntax() in ACVariation class

Returns a Vector of the SYNTAX fields in the AGENT-CAPABILITIES. The Vector element will be null if the SYNTAX field is absent.


getWriteSyntax

public java.util.Vector getWriteSyntax()
Deprecated. Since 3.0. Instead you can use getWriteSyntax() in ACVariation class.

Returns a Vector of the WRITE-SNTAX fields in the AGENT-CAPABILITIES. The Vector element will be null if the WRITE-SYNTAX field is absent.


getAccess

public java.util.Vector getAccess()
Deprecated. Since 3.0. Instead you can use getAccess() in ACVariation class.

Returns a Vector of the ACCESS field value in the AGENT-CAPABILITIES. The Vector element will contain empty string, if the ACCESS field is not present.


getCreationRequires

public java.util.Vector getCreationRequires()
Deprecated. Since 3.0. Instead you can use getCreationObjects() in ACVariation class.

Returns a Vector of CREATION-REQUIRES fields in the AGENT-CAPABILITIES. The Vector element will contain empty string, if the CREATION-REQUIRES field is absent.


getDefval

public java.util.Vector getDefval()
Deprecated. Since 3.0. Instead you can use getDefVal() in ACVariation class.

Returns a Vector of DEFVAL fields in the AGENT-CAPABILITIES. The Vector element will contain empty string, if the DEFVAL field is absent.


getVariationDescription

public java.util.Vector getVariationDescription()
Deprecated. Since 3.0. Instead you can use getDescription() in ACVariation class.

Returns a Vector of the DESCRIPTION value under VARIATION clause in AGENT-CAPABILITIES.



Copyright (c)AdventNet Inc., 1996-2006