[SNMP4J] RE: Context-sensitive columnar value validation

Mike Nuss mike at terascala.com
Thu Oct 9 15:29:37 CEST 2008


Thanks for your quick reply! This is exactly what I was looking for.

Mike

> -----Original Message-----
> From: Frank Fock [mailto:fock at agentpp.com]
> Sent: Wednesday, October 08, 2008 5:07 PM
> To: Mike Nuss
> Cc: snmp4j at agentpp.org
> Subject: Re: [SNMP4J] RE: Context-sensitive columnar value validation
> 
> Hi Mike,
> 
> You several options for columns:
> 
> (1) Overwrite MOMutableColumn.validateSetRequest if you want
> to verify a change with row context based on your column
> implementation.
> (2) Overwrite MOMutableRow2PC.prepare if you want to verify
> a column change within the context of the row.
> (3) Overwrite MOMutableRow2PC.prepareRow if you want to
> verify a row change an atomic change on the row.
> (..) Other approaches include using MOValueValidationListener
> as noted by you already.
> 
> I would prefer either (2) or (3) for returning a
> INCONSISTENT_VALUE error.
> 
> Best regards,
> Frank
> 
> Mike Nuss wrote:
> > Ack! adding line wraps...
> >
> > I'm wondering how to validate columnar values.  For scalars, there's an
> > isValueOK method that I can override.  For columns it seems I'm stuck
> with
> > using an MOValueValidationListener.  But the validate method contains
> only
> > the value of the variable, and not enough context to know which row of
> the
> > table is being modified.  For example, I'd like to return an
> > INCONSISTENT_VALUE error if the user has tried to set a value that may
> be
> > valid in some cases, but is not consistent with the rest of the row.
> >
> > Any suggestions?
> >
> > Thanks,
> > Mike
> > _______________________________________________
> > SNMP4J mailing list
> > SNMP4J at agentpp.org
> > http://lists.agentpp.org/mailman/listinfo/snmp4j
> 
> --
> AGENT++
> http://www.agentpp.com
> http://www.mibexplorer.com
> http://www.mibdesigner.com




More information about the SNMP4J mailing list