com.adventnet.snmp.mibs
Class NotificationGroup

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

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

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

The NOTIFICATION-GROUP macro will look as follows

 <lowerCaseName> NOTIFICATION-GROUP 
	NOTIFICATIONS        { <Notifications> }
	STATUS               <StatusV2>
	DESCRIPTION          <Text> 
	[REFERENCE           <Text>] 

 

where,

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

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

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

 Method 1
 MibModule module = mibOps.getMibModule("moduleName");
 Enumeration en = module.getDefinedNotificationGroups();
 while(en.hasMoreElements())
 {
  NotificationGroup ng = (NotificationGroup)en.nextElement();
 }
 

Method 2 MibModule module = mibOps.getMibModule("moduleName"); NotificationGroup ng = module.getNotificationGroup("notificationGroupName");

Since:
AdventNet SNMP API 4
See Also:
Serialized Form

Method Summary
 java.lang.String getDescription()
          Gets the description for this NotififcationGroup object.
 java.lang.String getName()
          Gets the name of this NotificationGroup object.
 java.util.Vector getNotifications()
          Gets the notifications defined in this NOTIFICATION-GROUP macro.
 java.lang.String getNumberedOIDString()
          Gets the numbered oid String of this NotificationGroup.
 java.lang.String getOIDString()
          Gets the named oid String of this NotificationGroup.
 java.lang.String getReference()
          Gets the REFERENCE string for this NotificationGroup object.
 java.lang.String getStatus()
          Gets the status value for this NotificationGroup object.
 java.lang.String toString()
          Returns the name of this NotificationGroup 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 NotificationGroup object. Same as the method toString()

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

getNotifications

public java.util.Vector getNotifications()
Gets the notifications defined in this NOTIFICATION-GROUP macro.

The method return the value of NOTIFICATIONS clause as a Vector.

Returns:
Vector containing the notifications.

getStatus

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

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

getDescription

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

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

getReference

public java.lang.String getReference()
Gets the REFERENCE string for this NotificationGroup object.

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

toString

public java.lang.String toString()
Returns the name of this NotificationGroup 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 NotificationGroup.

Returns:
the named oid String of this NotificationGroup object.

getNumberedOIDString

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

Returns:
the numbered oid String of this NotificationGroup object.


Copyright (c)AdventNet Inc., 1996-2006