[SNMP4J] [help]newbie Q:How to update a tableRow use SET from
Frank Fock
fock at agentpp.com
Sun Jun 21 16:02:25 CEST 2009
Hi,
PC is part of '2PC' and means 2-phase-commit.
The freeRow can be overwritten to free resources
allocated for the row. Bey default there are none
that have to be freed.
Best regards,
Frank
wei tong wrote:
> hi folks,
>
>
> i've solved the problem when i use SET pdu to update rows in the V3 agent;
> MOMutableColumn and DefaultMOMutableRow2PCFactory is my key.
> Is that a good way?
>
> but here's the Question
> -------------------------------------------------------------------------------------------
> in DefaultMOMutableRow2PCFactory.java ,
> what's the word 'PC' in the name meaning?
> why freeRow() do nothing by default?what the function for?
> -------------------------------------------------------------------------------------------
> codes here:
> MOMutableColumn[] columns = new MOMutableColumn[2];
> int c = 0;
> /*
> * use MOMutableColumn instead of MotableColumn ,so that the column
> ACCESS_READ_CREATE supported
> /*
> columns[c++] = new MOMutableColumn(c, SMIConstants.SYNTAX_INTEGER,
> MOAccessImpl.ACCESS_READ_CREATE);// Index
>
> columns[c++] = new MOMutableColumn(c, SMIConstants.SYNTAX_OCTET_STRING,
> MOAccessImpl.ACCESS_READ_CREATE);// IP
>
> DefaultMOTable ifTable = new DefaultMOTable(new OID(
> "1.3.6.1.4.1.750.1.2.9.1"), indexDef, columns);
>
> DefaultMOMutableTableModel model = (DefaultMOMutableTableModel)
> ifTable.getModel();
>
> Variable[] rowValues1 = new Variable[] { new Integer32(1),
> new OctetString("192.168.1.201") };
>
> model.addRow(new DefaultMOMutableRow2PC(new OID("1"), rowValues1));
> /*
> * this is very important ,
> * if (rowFactoy == null), it throw ex,and you will gei"object cannot
> be created"
> /*
>
> model.setRowFactory(new DefaultMOMutableRow2PCFactory());
>
>
> yours
> Tony Wii
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j
--
AGENT++
http://www.agentpp.com
http://www.snmp4j.com
http://www.mibexplorer.com
http://www.mibdesigner.com
More information about the SNMP4J
mailing list