Examples of SnmpVarBind


Examples of com.sun.jmx.snmp.SnmpVarBind

        for(int i=0; i < max; i++) {
            translation[i]= i;
            // we need to allocate a new SnmpVarBind. Otherwise the first
            // sub request will modify the list...
            //
            final SnmpVarBind newVarBind =
                new SnmpVarBind(list[i].oid, list[i].value);
            nonSyncVarBind.addNonSyncElement(newVarBind);
        }
    }
View Full Code Here

Examples of com.sun.jmx.snmp.SnmpVarBind

                        "updateResult","Position '"+pos+"' is out of bound...");
                }
                continue;
            }

            final SnmpVarBind element= e.nextElement();

            if (element == null) continue;
            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
                SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpSubRequestHandler.class.getName(),
                    "updateResult","Non repeaters Current element : " +
                      element + " from agent : " + agent);
            }
            final SnmpVarBind res = findVarBind(element,result[pos]);

            if(res == null) continue;

            result[pos] = res;
        }

        // Now update the values which have been repeated
        // more than once.
        int localR= size - nonRepeat;
        for (int i = 2 ; i <= maxRepeat ; i++) {
            for (int r = 0 ; r < localR ; r++) {
                final int pos = (i-1)* globalR + translation[nonRepeat + r] ;
                if (pos >= max)
                    return;
                if (e.hasMoreElements() ==false)
                    return;
                final SnmpVarBind element= e.nextElement();

                if (element == null) continue;
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpSubRequestHandler.class.getName(),
                        "updateResult","Repeaters Current element : " +
                          element + " from agent : " + agent);
                }
                final SnmpVarBind res = findVarBind(element, result[pos]);

                if(res == null) continue;

                result[pos] = res;
            }
View Full Code Here

Examples of com.sun.jmx.snmp.SnmpVarBind

        final SnmpVarBind[] varList  = new SnmpVarBind[size];
        final long[]        idList   = new long[size];
        int   i = 0;

        for (Enumeration<SnmpVarBind> e=req.getElements(); e.hasMoreElements();) {
            final SnmpVarBind var= e.nextElement();
            try {
                final long id = var.oid.getOidArc(depth);
                nameList[i]   = meta.getAttributeName(id);
                varList[i]    = var;
                idList[i]     = id;
View Full Code Here

Examples of com.sun.jmx.snmp.SnmpVarBind

        final SnmpVarBind[] varList  = new SnmpVarBind[size];
        final long[]        idList   = new long[size];
        int   i = 0;

        for (Enumeration<SnmpVarBind> e=req.getElements(); e.hasMoreElements();) {
            final SnmpVarBind var= e.nextElement();
            try {
                final long id = var.oid.getOidArc(depth);
                final String attname = meta.getAttributeName(id);
                final Object attvalue=
                    meta.buildAttributeValue(id,var.value);
View Full Code Here

Examples of com.sun.jmx.snmp.SnmpVarBind

        throws SnmpStatusException {

        final Object data = req.getUserData();

        for (Enumeration<SnmpVarBind> e=req.getElements(); e.hasMoreElements();) {
            final SnmpVarBind var= e.nextElement();
            try {
                final long id = var.oid.getOidArc(depth);
                // call meta.check() here, and meta.check will call check()
                check(meta,name,var.value,id,data);
            } catch(SnmpStatusException x) {
View Full Code Here

Examples of com.sun.jmx.snmp.SnmpVarBind

        if(inRequest.getVersion() == SnmpDefinitions.snmpVersionOne)
            throw new SnmpStatusException(SnmpStatusException.noSuchName);

        Enumeration<SnmpVarBind> l = inRequest.getElements();
        while(l.hasMoreElements()) {
            SnmpVarBind varbind = l.nextElement();
            varbind.setNoSuchObject();
        }
    }
View Full Code Here

Examples of com.sun.jmx.snmp.SnmpVarBind

        if(inRequest.getVersion() == SnmpDefinitions.snmpVersionOne)
            throw new SnmpStatusException(SnmpStatusException.noSuchName);

        Enumeration<SnmpVarBind> l = inRequest.getElements();
        while(l.hasMoreElements()) {
            SnmpVarBind varbind = l.nextElement();
            varbind.setEndOfMibView();
        }
    }
View Full Code Here

Examples of com.sun.jmx.snmp.SnmpVarBind

        if(inRequest.getVersion() == SnmpDefinitions.snmpVersionOne)
            throw new SnmpStatusException(SnmpDefinitions.snmpRspGenErr, 0);

        Enumeration<SnmpVarBind> l = inRequest.getElements();
        while(l.hasMoreElements()) {
            SnmpVarBind varbind = l.nextElement();
            varbind.setEndOfMibView();
        }
    }
View Full Code Here

Examples of com.sun.jmx.snmp.SnmpVarBind

        throws SnmpStatusException {

        final Object data = req.getUserData();

        for (Enumeration<SnmpVarBind> e= req.getElements(); e.hasMoreElements();) {
            final SnmpVarBind var= e.nextElement();
            try {
                final long id = var.oid.getOidArc(depth);
                var.value = meta.get(id, data);
            } catch(SnmpStatusException x) {
                req.registerGetException(var,x);
View Full Code Here

Examples of com.sun.jmx.snmp.SnmpVarBind

        throws SnmpStatusException {

        final Object data = req.getUserData();

        for (Enumeration<SnmpVarBind> e= req.getElements(); e.hasMoreElements();) {
            SnmpVarBind var = e.nextElement();
            try {
                // This method will generate a SnmpStatusException
                // if `depth' is out of bounds.
                //
                final long id = var.oid.getOidArc(depth);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.