// Home | Go Back //

/*
 * Copyright (c) 2002-2003 iReasoning Inc. All Rights Reserved.
 * 
 * This SOURCE CODE FILE, which has been provided by iReasoning Inc. as part
 * of an iReasoning Software product for use ONLY by licensed users of the product,
 * includes CONFIDENTIAL and PROPRIETARY information of iReasoning Inc.  
 *
 * USE OF THIS SOFTWARE IS GOVERNED BY THE TERMS AND CONDITIONS 
 * OF THE LICENSE STATEMENT AND LIMITED WARRANTY FURNISHED WITH
 * THE PRODUCT.
 *
 * IN PARTICULAR, YOU WILL INDEMNIFY AND HOLD IREASONING SOFTWARE, ITS
 * RELATED COMPANIES AND ITS SUPPLIERS, HARMLESS FROM AND AGAINST ANY
 * CLAIMS OR LIABILITIES ARISING OUT OF THE USE, REPRODUCTION, OR
 * DISTRIBUTION OF YOUR PROGRAMS, INCLUDING ANY CLAIMS OR LIABILITIES
 * ARISING OUT OF OR RESULTING FROM THE USE, MODIFICATION, OR
 * DISTRIBUTION OF PROGRAMS OR FILES CREATED FROM, BASED ON, AND/OR
 * DERIVED FROM THIS SOURCE CODE FILE.
 */

package agent.multihome;
import java.io.*;
import java.util.*;
import com.ireasoning.util.*;
import com.ireasoning.protocol.snmp.*;
import javax.management.*;


/**
 * Class for registering MBeans
 */
public class AgentMib
{
    // MBeanServer reference
    private static MBeanServer _server;
    // Root node of OID tree
    private static OIDTreeNode _root;
    
    /**
     * Registers all necessary MBeans
     */
    public static void registerMBeans(MBeanServer server, OIDTreeNode root)
    {
        _server = server;
        _root = root;
        try
        {
            // registerSnmpGroup();
            // registerUdpGroup();
            // registerTcpGroup();
            // registerSystemGroup();
            // registerEgpGroup();
            // registerIpGroup();
            // registerInterfacesGroup();
            // registerIcmpGroup();
            // registerIfTable();
            // registerAtTable();
            // registerIpAddrTable();
            // registerIpRouteTable();
            // registerIpNetToMediaTable();
            // registerTcpConnTable();
            // registerUdpTable();
            // registerEgpNeighTable();
        }
        catch(Exception e)
        {
            Logger.error(e);
            throw new SnmpException(e.toString());
        }
    }
    
    /**
     * Unregisters MBeans
     */
    public static void unregisterMBeans()
    {
        try
        {
            // unregisterSnmpGroup();
            // unregisterUdpGroup();
            // unregisterTcpGroup();
            // unregisterSystemGroup();
            // unregisterEgpGroup();
            // unregisterIpGroup();
            // unregisterInterfacesGroup();
            // unregisterIcmpGroup();
            // unregisterIfTable();
            // unregisterAtTable();
            // unregisterIpAddrTable();
            // unregisterIpRouteTable();
            // unregisterIpNetToMediaTable();
            // unregisterTcpConnTable();
            // unregisterUdpTable();
            // unregisterEgpNeighTable();
        }
        catch(Exception e)
        {
            Logger.error(e);
            throw new SnmpException(e.toString());
        }
    }
}