atom feed14 messages in net.java.dev.opendmk.usersRe: starting a standalone snmp agent
FromSent OnAttachments
Lucio CruscaFeb 10, 2011 9:03 am 
Daniel FuchsFeb 10, 2011 9:22 am 
Lucio CruscaFeb 11, 2011 6:49 am 
Daniel FuchsFeb 11, 2011 7:04 am 
Lucio CruscaFeb 11, 2011 8:20 am 
Lucio CruscaFeb 15, 2011 8:48 am 
Daniel FuchsFeb 20, 2011 6:10 am 
Lucio CruscaFeb 21, 2011 8:17 am 
Daniel FuchsFeb 21, 2011 9:28 am 
Lucio CruscaFeb 22, 2011 7:02 am 
Daniel FuchsFeb 22, 2011 9:07 am 
Lucio CruscaMar 31, 2011 9:17 am 
Daniel FuchsMar 31, 2011 9:39 am 
Daniel FuchsMar 31, 2011 9:53 am 
Subject:Re: starting a standalone snmp agent
From:Daniel Fuchs (dani@oracle.com)
Date:Feb 21, 2011 9:28:21 am
List:net.java.dev.opendmk.users

On 2/21/11 5:18 PM, Lucio Crusca wrote:

In data domenica 20 febbraio 2011 15:11:02, Daniel Fuchs ha scritto:

Hi Lucio,

Sorry for the late answer. I suggest you have a look at how to implement tables as described in the Java DMK tutorial.

http://java.sun.com/products/jdmk/jdmk_docs.html

Thanks, I've had a look, but if I understood well page 321 and following of the tutorial, in order to programmatically populate my mib I'm forced to use (hence write) a remote manager... am I correct?

No - but if I remember well you may have to subclass the MIB bean, and possibly any other intermediate group beans in order to get hold of the table bean in which you will add your entries.

The relevant section is '16.4 Standalone SNMP Agents' page 283.

In that code the IfTable (TableIfTable.java) is populated in the the constructor of the Interfaces group (subclassed in InterfaceImpl.java) which contains it.

So if you have a Mib MX containing a group GX containing a table XTable, I think you will need to create a subclass of Mib MX (MX_Impl) in order to instantiate a subclass of group GX (GX_Impl) in order to either populate directly the table TableXTable from GX_Impl, or create a subclass of TableXTable (TableXTable_Impl).

I think you should be able to find your way by looking at the file generated for the MIB, which should contain factory methods that create instances of the generated group beans (GX in my ex above).

To add an entry, you must create an instance of the XTableEntry bean, make sure to assign the values that are used as indices, and then just call TableXTable.addEntry(bean).

Hope this helps,

-- daniel