/*
 * This Java file has been generated by smidump 0.4.5. It
 * is intended to be edited by the application programmer and
 * to be used within a Java AgentX sub-agent environment.
 *
 * $Id: ProtocolDirEntryImpl.java 4432 2006-05-29 16:21:11Z strauss $
 */

/**
    This class extends the Java AgentX (JAX) implementation of
    the table row protocolDirEntry defined in RMON2-MIB.
 */

import jax.AgentXOID;
import jax.AgentXSetPhase;
import jax.AgentXResponsePDU;
import jax.AgentXEntry;

public class ProtocolDirEntryImpl extends ProtocolDirEntry
{

    // constructor
    public ProtocolDirEntryImpl(byte[] protocolDirID,
                            byte[] protocolDirParameters)
    {
        super(protocolDirID,
                  protocolDirParameters);
    }

    public int get_protocolDirLocalIndex()
    {
        return protocolDirLocalIndex;
    }

    public byte[] get_protocolDirDescr()
    {
        return protocolDirDescr;
    }

    public int set_protocolDirDescr(AgentXSetPhase phase, byte[] value)
    {
        switch (phase.getPhase()) {
        case AgentXSetPhase.TEST_SET:
            break;
        case AgentXSetPhase.COMMIT:
            undo_protocolDirDescr = protocolDirDescr;
            protocolDirDescr = new byte[value.length];
            for(int i = 0; i < value.length; i++)
                protocolDirDescr[i] = value[i];
            break;
        case AgentXSetPhase.UNDO:
            protocolDirDescr = undo_protocolDirDescr;
            break;
        case AgentXSetPhase.CLEANUP:
            undo_protocolDirDescr = null;
            break;
        default:
            return AgentXResponsePDU.PROCESSING_ERROR;
        }
        return AgentXResponsePDU.NO_ERROR;
    }
    public byte[] get_protocolDirType()
    {
        return protocolDirType;
    }

    public int get_protocolDirAddressMapConfig()
    {
        return protocolDirAddressMapConfig;
    }

    public int set_protocolDirAddressMapConfig(AgentXSetPhase phase, int value)
    {
        switch (phase.getPhase()) {
        case AgentXSetPhase.TEST_SET:
            break;
        case AgentXSetPhase.COMMIT:
            undo_protocolDirAddressMapConfig = protocolDirAddressMapConfig;
            protocolDirAddressMapConfig = value;
            break;
        case AgentXSetPhase.UNDO:
            protocolDirAddressMapConfig = undo_protocolDirAddressMapConfig;
            break;
        case AgentXSetPhase.CLEANUP:
            break;
        default:
            return AgentXResponsePDU.PROCESSING_ERROR;
        }
        return AgentXResponsePDU.NO_ERROR;
    }
    public int get_protocolDirHostConfig()
    {
        return protocolDirHostConfig;
    }

    public int set_protocolDirHostConfig(AgentXSetPhase phase, int value)
    {
        switch (phase.getPhase()) {
        case AgentXSetPhase.TEST_SET:
            break;
        case AgentXSetPhase.COMMIT:
            undo_protocolDirHostConfig = protocolDirHostConfig;
            protocolDirHostConfig = value;
            break;
        case AgentXSetPhase.UNDO:
            protocolDirHostConfig = undo_protocolDirHostConfig;
            break;
        case AgentXSetPhase.CLEANUP:
            break;
        default:
            return AgentXResponsePDU.PROCESSING_ERROR;
        }
        return AgentXResponsePDU.NO_ERROR;
    }
    public int get_protocolDirMatrixConfig()
    {
        return protocolDirMatrixConfig;
    }

    public int set_protocolDirMatrixConfig(AgentXSetPhase phase, int value)
    {
        switch (phase.getPhase()) {
        case AgentXSetPhase.TEST_SET:
            break;
        case AgentXSetPhase.COMMIT:
            undo_protocolDirMatrixConfig = protocolDirMatrixConfig;
            protocolDirMatrixConfig = value;
            break;
        case AgentXSetPhase.UNDO:
            protocolDirMatrixConfig = undo_protocolDirMatrixConfig;
            break;
        case AgentXSetPhase.CLEANUP:
            break;
        default:
            return AgentXResponsePDU.PROCESSING_ERROR;
        }
        return AgentXResponsePDU.NO_ERROR;
    }
    public byte[] get_protocolDirOwner()
    {
        return protocolDirOwner;
    }

    public int set_protocolDirOwner(AgentXSetPhase phase, byte[] value)
    {
        switch (phase.getPhase()) {
        case AgentXSetPhase.TEST_SET:
            break;
        case AgentXSetPhase.COMMIT:
            undo_protocolDirOwner = protocolDirOwner;
            protocolDirOwner = new byte[value.length];
            for(int i = 0; i < value.length; i++)
                protocolDirOwner[i] = value[i];
            break;
        case AgentXSetPhase.UNDO:
            protocolDirOwner = undo_protocolDirOwner;
            break;
        case AgentXSetPhase.CLEANUP:
            undo_protocolDirOwner = null;
            break;
        default:
            return AgentXResponsePDU.PROCESSING_ERROR;
        }
        return AgentXResponsePDU.NO_ERROR;
    }
    public int get_protocolDirStatus()
    {
        return protocolDirStatus;
    }

    public int set_protocolDirStatus(AgentXSetPhase phase, int value)
    {
        switch (phase.getPhase()) {
        case AgentXSetPhase.TEST_SET:
            break;
        case AgentXSetPhase.COMMIT:
            undo_protocolDirStatus = protocolDirStatus;
            protocolDirStatus = value;
            break;
        case AgentXSetPhase.UNDO:
            protocolDirStatus = undo_protocolDirStatus;
            break;
        case AgentXSetPhase.CLEANUP:
            break;
        default:
            return AgentXResponsePDU.PROCESSING_ERROR;
        }
        return AgentXResponsePDU.NO_ERROR;
    }
}

