com.sun.jaw.snmp.manager
Class SnmpMain

java.lang.Object
  |
  +--com.sun.jaw.snmp.manager.SnmpMain

public class SnmpMain
extends java.lang.Object

This class creates a socket and then starts all servers required to do SNMP operation.

This class assumes only one SnmpMain per Java Virtual Machine.


Method Summary
 void finalize()
          Sets all the references to the SnmpMain object to null.
static MibStoreIfSrv getMibStore()
          Gets the MibStore associated with this SnmpMain.
static SnmpTrapAgent getSnmpTrapAgent()
          Gets the SnmpTrapAgent (an Snmp Trap Handler) associated with this SnmpMain.
static void initializeSNMP()
          Initializes this SnmpMain object.
static void initializeSNMP(MibStoreIfSrv mib)
          Initializes this SnmpMain object with the specified mib value.
static void setSnmpTrapAgent(SnmpTrapAgent trapAgent)
          Sets the SnmpTrapAgent (an Snmp Trap Handler) associated with this SnmpMain.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

initializeSNMP

public static void initializeSNMP(MibStoreIfSrv mib)
                           throws SnmpStatusException
Initializes this SnmpMain object with the specified mib value. If there is no SnmpMain object already instantiated, a new one is created and its MibStore is updated with the specified mib value. Otherwise, the specified mib value is simply added to the MibStore.
Parameters:
mib - The mib value.
Throws:
SnmpStatusException - An error occurred while accessing a MIB node.

initializeSNMP

public static void initializeSNMP()
                           throws SnmpStatusException
Initializes this SnmpMain object. If there is no SnmpMain object already instantiated, a new one is created. Otherwise, nothing is done.
Throws:
SnmpStatusException - An error occurred while accessing a MIB node.

getMibStore

public static MibStoreIfSrv getMibStore()
Gets the MibStore associated with this SnmpMain.
Returns:
The MibStore.

getSnmpTrapAgent

public static SnmpTrapAgent getSnmpTrapAgent()
Gets the SnmpTrapAgent (an Snmp Trap Handler) associated with this SnmpMain.
Returns:
The SnmpTrapAgent.

setSnmpTrapAgent

public static void setSnmpTrapAgent(SnmpTrapAgent trapAgent)
Sets the SnmpTrapAgent (an Snmp Trap Handler) associated with this SnmpMain.
Parameters:
trapAgent - The SnmpTrapAgent.

finalize

public void finalize()
Sets all the references to the SnmpMain object to null.
Overrides:
finalize in class java.lang.Object