com.adventnet.snmp.mibs
Class NotificationType

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

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

This class contains the information about the NOTIFICATION-TYPE macro in a MIB module. The NOTIFICATION-TYPE macro is used in an SMIv2 MIB to specify the notifications that can be sent to the SNMP managers.

The NOTIFICATION-TYPE macro will look as follows

 <lowerCaseName>  NOTIFICATION-TYPE 
	[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 the SMIv2 status value.
<Text> is the quoted String

The NotificationType object can be obtained using any one of the following methods after loading the MIB file containing the NOTIFICATION-TYPE macro.

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

Method 1 MibModule module = mibOps.getMibModule("moduleName"); Enumeration en = module.getDefinedNotificationTypes(); while(en.hasMoreElements()) { NotificationType nt = (NotificationType)en.nextElement(); }

Method 2 MibModule module = mibOps.getMibModule("moduleName"); NotificationType nt = module.getNotificationType("notificationName");

Since:
AdventNet SNMP API 4
See Also:
Serialized Form

Method Summary
 java.lang.String getDescription()
          Gets the DESCRIPTION string for this NotificationType object.
 java.lang.String getName()
          Gets the name of this NotificationType object.
 java.lang.String getNumberedOIDString()
          Gets the numbered oid String of this NotificationType.
 java.util.Vector getObjects()
          Gets the OBJECT clause names in this NOTIFICATION-TYPE macro.
 java.lang.String getOIDString()
          Gets the named oid String of this NotificationType.
 java.lang.String getReference()
          Gets the REFERENCE string for this NotificationType object.
 java.lang.String getStatus()
          Gets the STATUS value of this NotificationType object.
 java.lang.String toString()
          Gives the name of this NotificationType 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 NotificationType object. Same as the method toString()

Returns:
the name of the NOTIFICATION-TYPE macro
See Also:
toString()

getObjects

public java.util.Vector getObjects()
Gets the OBJECT clause names in this NOTIFICATION-TYPE macro. The OBJECTS clause is an optional field. This clause is used to specify one or more scalar or columnar objects. The values of these objects describe the notification

Returns:
Vector containing the String objects.
empty vector, if there is no objects.

getStatus

public java.lang.String getStatus()
Gets the STATUS value of this NotificationType object.

The status of the objects defined in the OBJECTS clause must conform with the status of the event definition.

i.e. if the status value of the event definition is "current", then all the objects in the OBJECTS clause should have a status value of "current". If the status value of the event definition is "deprecated", then the objects can have a status value of "deprecated" or "current". If the status value of event definition is "obsolete", then the objects can have a status value of "current", "deprecated" or "obsolete".

Returns:
the value of the STATUS clause for this NOTIFICATION-TYPE object

getDescription

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

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

getReference

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

Returns:
the REFERENCE value, if the REFERENCE clause is present.
null, otherwise.

toString

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

Returns:
the named oid String of this NotificationType object.

getNumberedOIDString

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

Returns:
the numbered oid String of this NotificationType object.


Copyright (c)AdventNet Inc., 1996-2006