// 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 udp mib object in RFC1213_MIB
 */
public class UdpGroup extends SnmpBaseGroup implements UdpGroupMBean
{
    // SnmpOID: .1.3.6.1.2.1.7.1.0
    protected SnmpCounter32 _udpInDatagrams = null;
    // SnmpOID: .1.3.6.1.2.1.7.2.0
    protected SnmpCounter32 _udpNoPorts = null;
    // SnmpOID: .1.3.6.1.2.1.7.3.0
    protected SnmpCounter32 _udpInErrors = null;
    // SnmpOID: .1.3.6.1.2.1.7.4.0
    protected SnmpCounter32 _udpOutDatagrams = null;
    
    /**
     * Constructor
     * @param root SnmpOID tree root
     * @param oid the SnmpOID of this group
     * @param args the objects passed from caller for Initialization purpose
     */
    public UdpGroup(OIDTreeNode root, String oid, Object [] args)
    {
        super(root, oid);
    }
    
    /**
     * Gets new udpInDatagrams value
     */
    public synchronized SnmpCounter32 getUdpInDatagrams()
    {
        if(this._udpInDatagrams != null) return this._udpInDatagrams;
        else
        {
            String s = JNIFunction.getScalar("udpInDatagrams");
            return new SnmpCounter32(s);
        }
    }
    
    /**
     * Sets new udpInDatagrams value
     * @param value the new value
     */
    public synchronized void setUdpInDatagrams(SnmpCounter32 newValue)
    {
        this._udpInDatagrams = newValue;
    }
    
    /**
     * Gets new udpNoPorts value
     */
    public synchronized SnmpCounter32 getUdpNoPorts()
    {
        if(this._udpNoPorts != null) return this._udpNoPorts;
        else
        {
            String s = JNIFunction.getScalar("udpNoPorts");
            return new SnmpCounter32(s);
        }
    }
    
    /**
     * Sets new udpNoPorts value
     * @param value the new value
     */
    public synchronized void setUdpNoPorts(SnmpCounter32 newValue)
    {
        this._udpNoPorts = newValue;
    }
    
    /**
     * Gets new udpInErrors value
     */
    public synchronized SnmpCounter32 getUdpInErrors()
    {
        if(this._udpInErrors != null) return this._udpInErrors;
        else
        {
            String s = JNIFunction.getScalar("udpInErrors");
            return new SnmpCounter32(s);
        }
    }
    
    /**
     * Sets new udpInErrors value
     * @param value the new value
     */
    public synchronized void setUdpInErrors(SnmpCounter32 newValue)
    {
        this._udpInErrors = newValue;
    }
    
    /**
     * Gets new udpOutDatagrams value
     */
    public synchronized SnmpCounter32 getUdpOutDatagrams()
    {
        if(this._udpOutDatagrams != null) return this._udpOutDatagrams;
        else
        {
            String s = JNIFunction.getScalar("udpOutDatagrams");
            return new SnmpCounter32(s);
        }
    }
    
    /**
     * Sets new udpOutDatagrams value
     * @param value the new value
     */
    public synchronized void setUdpOutDatagrams(SnmpCounter32 newValue)
    {
        this._udpOutDatagrams = newValue;
    }
    
}