// 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.mib2jni;
import java.io.*;
import java.util.*;
import com.ireasoning.util.*;
import com.ireasoning.protocol.snmp.*;
import javax.management.*;
import com.ireasoning.jni.*;

/**
 * Class represents ipRouteTable MIB object in RFC1213_MIB
 */
public class IpRouteTable extends DynamicTable implements IpRouteTableMBean
{
    /**
     * Constructor
     * @param root SnmpOID tree root
     * @param oid the SnmpOID of this table. For example, ".1.3.6.1.2.1.2.2" for IfTable in RFC1213  
     * @param args the objects passed from caller for Initialization purpose
     */
    public IpRouteTable (OIDTreeNode root, String oid, Object[] args)
    {
        super(root, oid, "ipRouteTable", IpRouteEntry.class, 60000 * 60);
    }
    
    /**
     * Creates a new instance of table entry object
     */
    public SnmpTableEntry newEntryInstance()
    {
        return new IpRouteEntry (this);
    }
    
    /**
     * Gets ipRouteDest value
     * @param ipRouteEntry table entry object
     */
    public SnmpIpAddress getIpRouteDest(SnmpTableEntry ipRouteEntry)
    {
        synchronized (ipRouteEntry)
        {
            IpRouteEntry entry = (IpRouteEntry) ipRouteEntry;
            // TODO: Add your implementation
            return entry._ipRouteDest;
        }
    }
    
    /**
     * Sets new ipRouteDest value
     * @param ipRouteEntry table entry object
     * @param newValue new value to be set
     */
    public void setIpRouteDest(SnmpTableEntry ipRouteEntry, SnmpIpAddress newValue)
    {
        synchronized (ipRouteEntry)
        {
            IpRouteEntry entry = (IpRouteEntry) ipRouteEntry;
            entry._ipRouteDest = newValue;
            // TODO: Add your implementation
        }
    }
    
    /**
     * Gets ipRouteIfIndex value
     * @param ipRouteEntry table entry object
     */
    public int getIpRouteIfIndex(SnmpTableEntry ipRouteEntry)
    {
        synchronized (ipRouteEntry)
        {
            IpRouteEntry entry = (IpRouteEntry) ipRouteEntry;
            // TODO: Add your implementation
            return entry._ipRouteIfIndex;
        }
    }
    
    /**
     * Sets new ipRouteIfIndex value
     * @param ipRouteEntry table entry object
     * @param newValue new value to be set
     */
    public void setIpRouteIfIndex(SnmpTableEntry ipRouteEntry, int newValue)
    {
        synchronized (ipRouteEntry)
        {
            IpRouteEntry entry = (IpRouteEntry) ipRouteEntry;
            entry._ipRouteIfIndex = newValue;
            // TODO: Add your implementation
        }
    }
    
    /**
     * Gets ipRouteMetric1 value
     * @param ipRouteEntry table entry object
     */
    public int getIpRouteMetric1(SnmpTableEntry ipRouteEntry)
    {
        synchronized (ipRouteEntry)
        {
            IpRouteEntry entry = (IpRouteEntry) ipRouteEntry;
            // TODO: Add your implementation
            return entry._ipRouteMetric1;
        }
    }
    
    /**
     * Sets new ipRouteMetric1 value
     * @param ipRouteEntry table entry object
     * @param newValue new value to be set
     */
    public void setIpRouteMetric1(SnmpTableEntry ipRouteEntry, int newValue)
    {
        synchronized (ipRouteEntry)
        {
            IpRouteEntry entry = (IpRouteEntry) ipRouteEntry;
            entry._ipRouteMetric1 = newValue;
            // TODO: Add your implementation
        }
    }
    
    /**
     * Gets ipRouteMetric2 value
     * @param ipRouteEntry table entry object
     */
    public int getIpRouteMetric2(SnmpTableEntry ipRouteEntry)
    {
        synchronized (ipRouteEntry)
        {
            IpRouteEntry entry = (IpRouteEntry) ipRouteEntry;
            // TODO: Add your implementation
            return entry._ipRouteMetric2;
        }
    }
    
    /**
     * Sets new ipRouteMetric2 value
     * @param ipRouteEntry table entry object
     * @param newValue new value to be set
     */
    public void setIpRouteMetric2(SnmpTableEntry ipRouteEntry, int newValue)
    {
        synchronized (ipRouteEntry)
        {
            IpRouteEntry entry = (IpRouteEntry) ipRouteEntry;
            entry._ipRouteMetric2 = newValue;
            // TODO: Add your implementation
        }
    }
    
    /**
     * Gets ipRouteMetric3 value
     * @param ipRouteEntry table entry object
     */
    public int getIpRouteMetric3(SnmpTableEntry ipRouteEntry)
    {
        synchronized (ipRouteEntry)
        {
            IpRouteEntry entry = (IpRouteEntry) ipRouteEntry;
            // TODO: Add your implementation
            return entry._ipRouteMetric3;
        }
    }
    
    /**
     * Sets new ipRouteMetric3 value
     * @param ipRouteEntry table entry object
     * @param newValue new value to be set
     */
    public void setIpRouteMetric3(SnmpTableEntry ipRouteEntry, int newValue)
    {
        synchronized (ipRouteEntry)
        {
            IpRouteEntry entry = (IpRouteEntry) ipRouteEntry;
            entry._ipRouteMetric3 = newValue;
            // TODO: Add your implementation
        }
    }
    
    /**
     * Gets ipRouteMetric4 value
     * @param ipRouteEntry table entry object
     */
    public int getIpRouteMetric4(SnmpTableEntry ipRouteEntry)
    {
        synchronized (ipRouteEntry)
        {
            IpRouteEntry entry = (IpRouteEntry) ipRouteEntry;
            // TODO: Add your implementation
            return entry._ipRouteMetric4;
        }
    }
    
    /**
     * Sets new ipRouteMetric4 value
     * @param ipRouteEntry table entry object
     * @param newValue new value to be set
     */
    public void setIpRouteMetric4(SnmpTableEntry ipRouteEntry, int newValue)
    {
        synchronized (ipRouteEntry)
        {
            IpRouteEntry entry = (IpRouteEntry) ipRouteEntry;
            entry._ipRouteMetric4 = newValue;
            // TODO: Add your implementation
        }
    }
    
    /**
     * Gets ipRouteNextHop value
     * @param ipRouteEntry table entry object
     */
    public SnmpIpAddress getIpRouteNextHop(SnmpTableEntry ipRouteEntry)
    {
        synchronized (ipRouteEntry)
        {
            IpRouteEntry entry = (IpRouteEntry) ipRouteEntry;
            // TODO: Add your implementation
            return entry._ipRouteNextHop;
        }
    }
    
    /**
     * Sets new ipRouteNextHop value
     * @param ipRouteEntry table entry object
     * @param newValue new value to be set
     */
    public void setIpRouteNextHop(SnmpTableEntry ipRouteEntry, SnmpIpAddress newValue)
    {
        synchronized (ipRouteEntry)
        {
            IpRouteEntry entry = (IpRouteEntry) ipRouteEntry;
            entry._ipRouteNextHop = newValue;
            // TODO: Add your implementation
        }
    }
    
    /**
     * Gets ipRouteType value
     * @param ipRouteEntry table entry object
     */
    public int getIpRouteType(SnmpTableEntry ipRouteEntry)
    {
        synchronized (ipRouteEntry)
        {
            IpRouteEntry entry = (IpRouteEntry) ipRouteEntry;
            // TODO: Add your implementation
            return entry._ipRouteType;
        }
    }
    
    /**
     * Sets new ipRouteType value
     * @param ipRouteEntry table entry object
     * @param newValue new value to be set
     */
    public void setIpRouteType(SnmpTableEntry ipRouteEntry, int newValue)
    {
        synchronized (ipRouteEntry)
        {
            IpRouteEntry entry = (IpRouteEntry) ipRouteEntry;
            entry._ipRouteType = newValue;
            // TODO: Add your implementation
        }
    }
    
    /**
     * Gets ipRouteProto value
     * @param ipRouteEntry table entry object
     */
    public int getIpRouteProto(SnmpTableEntry ipRouteEntry)
    {
        synchronized (ipRouteEntry)
        {
            IpRouteEntry entry = (IpRouteEntry) ipRouteEntry;
            // TODO: Add your implementation
            return entry._ipRouteProto;
        }
    }
    
    /**
     * Sets new ipRouteProto value
     * @param ipRouteEntry table entry object
     * @param newValue new value to be set
     */
    public void setIpRouteProto(SnmpTableEntry ipRouteEntry, int newValue)
    {
        // This MIB node is not writeable, so IpRouteTableMBean does not have this method
        synchronized (ipRouteEntry)
        {
            IpRouteEntry entry = (IpRouteEntry) ipRouteEntry;
            entry._ipRouteProto = newValue;
            // TODO: Add your implementation
        }
    }
    
    /**
     * Gets ipRouteAge value
     * @param ipRouteEntry table entry object
     */
    public int getIpRouteAge(SnmpTableEntry ipRouteEntry)
    {
        synchronized (ipRouteEntry)
        {
            IpRouteEntry entry = (IpRouteEntry) ipRouteEntry;
            // TODO: Add your implementation
            return entry._ipRouteAge;
        }
    }
    
    /**
     * Sets new ipRouteAge value
     * @param ipRouteEntry table entry object
     * @param newValue new value to be set
     */
    public void setIpRouteAge(SnmpTableEntry ipRouteEntry, int newValue)
    {
        synchronized (ipRouteEntry)
        {
            IpRouteEntry entry = (IpRouteEntry) ipRouteEntry;
            entry._ipRouteAge = newValue;
            // TODO: Add your implementation
        }
    }
    
    /**
     * Gets ipRouteMask value
     * @param ipRouteEntry table entry object
     */
    public SnmpIpAddress getIpRouteMask(SnmpTableEntry ipRouteEntry)
    {
        synchronized (ipRouteEntry)
        {
            IpRouteEntry entry = (IpRouteEntry) ipRouteEntry;
            // TODO: Add your implementation
            return entry._ipRouteMask;
        }
    }
    
    /**
     * Sets new ipRouteMask value
     * @param ipRouteEntry table entry object
     * @param newValue new value to be set
     */
    public void setIpRouteMask(SnmpTableEntry ipRouteEntry, SnmpIpAddress newValue)
    {
        synchronized (ipRouteEntry)
        {
            IpRouteEntry entry = (IpRouteEntry) ipRouteEntry;
            entry._ipRouteMask = newValue;
            // TODO: Add your implementation
        }
    }
    
    /**
     * Gets ipRouteMetric5 value
     * @param ipRouteEntry table entry object
     */
    public int getIpRouteMetric5(SnmpTableEntry ipRouteEntry)
    {
        synchronized (ipRouteEntry)
        {
            IpRouteEntry entry = (IpRouteEntry) ipRouteEntry;
            // TODO: Add your implementation
            return entry._ipRouteMetric5;
        }
    }
    
    /**
     * Sets new ipRouteMetric5 value
     * @param ipRouteEntry table entry object
     * @param newValue new value to be set
     */
    public void setIpRouteMetric5(SnmpTableEntry ipRouteEntry, int newValue)
    {
        synchronized (ipRouteEntry)
        {
            IpRouteEntry entry = (IpRouteEntry) ipRouteEntry;
            entry._ipRouteMetric5 = newValue;
            // TODO: Add your implementation
        }
    }
    
    /**
     * Gets ipRouteInfo value
     * @param ipRouteEntry table entry object
     */
    public SnmpOID getIpRouteInfo(SnmpTableEntry ipRouteEntry)
    {
        synchronized (ipRouteEntry)
        {
            IpRouteEntry entry = (IpRouteEntry) ipRouteEntry;
            // TODO: Add your implementation
            return entry._ipRouteInfo;
        }
    }
    
    /**
     * Sets new ipRouteInfo value
     * @param ipRouteEntry table entry object
     * @param newValue new value to be set
     */
    public void setIpRouteInfo(SnmpTableEntry ipRouteEntry, SnmpOID newValue)
    {
        // This MIB node is not writeable, so IpRouteTableMBean does not have this method
        synchronized (ipRouteEntry)
        {
            IpRouteEntry entry = (IpRouteEntry) ipRouteEntry;
            entry._ipRouteInfo = newValue;
            // TODO: Add your implementation
        }
    }
    
}