[SNMP4J] How do I register my server variables?

Mark Stang mstang at pingidentity.com
Tue Jul 17 23:51:29 CEST 2007


Hi,

In the TestAgent there is code to register managed objects.  This appears to be for a local variable and they are of SNMP4J types.  What if I have an enum or something that is being incremented by my server?  Do I just "wrapper" it and let it go at that?

        @Override
        protected void registerManagedObjects()
        {
            try
            {
                server.register(wrapVariable(1, userAuthSuccesses), null);
                server.register(wrapVariable(2, userAuthFailures), null);
                server.register(wrapVariable(3, sessionCreationSuccess), null);
                server.register(wrapVariable(4, sessionCreationFailures), null);
                server.register(wrapVariable(5, averageAuthsPerSecond), null);
            }
            catch (DuplicateRegistrationException e)
            {
                throw new RuntimeException(e);
            }

        }

Best regards,

Mark

Mark J. Stang
Software Engineer
office: +1 303.468.2900
Ping Identity





More information about the SNMP4J mailing list