com.adventnet.snmp.mibs
Class ObjectGroup

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

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

This class represents a OBJECT-GROUP macro in a module.

The OBJECT-GROUP macro will look as follows

 <lowerCaseName> OBJECT-GROUP 
 	OBJECTS		{ <Objects> } 
 	STATUS		<StatusV2> 
 	DESCRIPTION	<Text> 
 	[REFERENCE	<Text>]
	
 

where,

<lowerCaseName> is any name starting with lower case.
<Objects> is one or more objects seperated by a comma.
<StatusV2> is SMIv2 status value.
<Text> is a quoted String.

The OBJECT-GROUP object can be obtained using any one of the following methods after loading the MIB module that contains the OBJECT-GROUP macro.

 MibOperations mibOps = new MibOperations();
 mibOps.loadMibModule("mibFile");
 

 Method 1
 MibModule module = mibOps.getMibModule("moduleName");
 Enumeration en = module.getDefinedObjectGroups();
 while(en.hasMoreElements())
 {
	ObjectGroup og = (ObjectGroup)en.nextElement();
 }
 

Method 2 MibModule module = mibOps.getMibModule("moduleName"); ObjectGroup og = module.getObjectGroup("objectGroupName");

Since:
AdventNet SNMP API 4
See Also:
Serialized Form

Method Summary
 java.lang.String getDescription()
          Gets the description for this ObjectGroup object.
 java.lang.String getName()
          Gets the name of this ObjectGroup object.
 java.lang.String getNumberedOIDString()
          Gets the numbered oid String of this ObjectGroup.
 java.util.Vector getObjects()
          Gets the objects defined in this OBJECT-GROUP macro.
 java.lang.String getOIDString()
          Gets the named oid String of this ObjectGroup.
 java.lang.String getReference()
          Gets the REFERENCE string for this OBJECT-GROUP macro.
 java.lang.String getStatus()
          Gets the status value for this ObjectGroup object.
 java.lang.String toString()
          Gives the name of this ObjectGroup object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getName

public java.lang.String getName()
Gets the name of this ObjectGroup object. Same as the method toString()

Returns:
String - the name of this ObjectGroup object.
See Also:
toString()

getObjects

public java.util.Vector getObjects()
Gets the objects defined in this OBJECT-GROUP macro.

This method returns the value of OBJECTS clause as a Vector.

Returns:
Vector containing the objects.

getStatus

public java.lang.String getStatus()
Gets the status value for this ObjectGroup object.

Returns:
the value of STATUS clause for this OBJECT-GROUP macro.

getDescription

public java.lang.String getDescription()
Gets the description for this ObjectGroup object.

Returns:
the value of the DESCRIPTION clause for this OBJECT-GROUP macro.

getReference

public java.lang.String getReference()
Gets the REFERENCE string for this OBJECT-GROUP macro.

Returns:
the REFERENCE value, if present.
empty string, if not found.

toString

public java.lang.String toString()
Gives the name of this ObjectGroup object. Same as the getName() method

Overrides:
toString in class java.lang.Object
See Also:
getName()

getOIDString

public java.lang.String getOIDString()
Gets the named oid String of this ObjectGroup.

Returns:
the named oid String of this ObjectGroup object.

getNumberedOIDString

public java.lang.String getNumberedOIDString()
Gets the numbered oid String of this ObjectGroup.

Returns:
the numbered oid String of this ObjectGroup object.


Copyright (c)AdventNet Inc., 1996-2006