Package com.sun.jmx.snmp

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


      if (pos >= max) {
    debug("updateResult","Position `"+pos+"' is out of bound...");
    continue;
      }

      final SnmpVarBind element= (SnmpVarBind) e.nextElement();
     
      if (element == null) continue;
      if (isDebugOn())
    trace("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= (SnmpVarBind) e.nextElement();
   
    if (element == null) continue;
    if (isDebugOn())
        trace("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

  throws SnmpStatusException {

  final Object data = req.getUserData();

        for (Enumeration e= req.getElements(); e.hasMoreElements();) {
            final SnmpVarBind var= (SnmpVarBind) 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

  throws SnmpStatusException {
 
  final Object data = req.getUserData();
  for (Enumeration e= req.getElements(); e.hasMoreElements();) {
      SnmpVarBind var = null;
      var = (SnmpVarBind) e.nextElement();
      try {
    // This method will generate a SnmpStatusException
    // if `depth' is out of bounds.
    //
View Full Code Here

  throws SnmpStatusException {
 
  final Object data = req.getUserData();
 
  for (Enumeration e= req.getElements(); e.hasMoreElements();) {
      final SnmpVarBind var = (SnmpVarBind) 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

  // if the entry does not exists, then registers an error for
  // each varbind involved (nb: should not happen, the error
  // should have been registered earlier) 
  if (isnew) {
      SnmpVarBind     var = null;
      for (Enumeration e= r.getElements(); e.hasMoreElements();) {
    var      = (SnmpVarBind) e.nextElement();
    r.registerGetException(var,noSuchInstanceException);
      }
  }
View Full Code Here

     **/
    protected int getRowAction(SnmpMibSubRequest req, SnmpOid rowOid,
             int depth)
  throws SnmpStatusException {
  final boolean     isnew  = req.isNewEntry();
  final SnmpVarBind vb = req.getRowStatusVarBind();
  if (vb == null) {
      if (isnew && ! hasRowStatus())
    return EnumRowStatus.createAndGo;
      else return EnumRowStatus.unspecified;
  }
View Full Code Here

          rowOid + "] : specified RowStatus = " + action);
      setRowStatusFail(req,
        SnmpStatusException.snmpRspInconsistentValue);
  }
  if (value != null) {
      final SnmpVarBind vb = req.getRowStatusVarBind();
      if (vb != null) vb.value = value;
  }
    }
View Full Code Here

    // ---------------------------------------------------------------------

    final static void checkRowStatusFail(SnmpMibSubRequest req,
           int errorStatus)
  throws SnmpStatusException {
  final SnmpVarBind statusvb  = req.getRowStatusVarBind();
  final SnmpStatusException x = new SnmpStatusException(errorStatus);
  req.registerCheckException(statusvb,x);
    }
View Full Code Here

    // ---------------------------------------------------------------------

    final static void setRowStatusFail(SnmpMibSubRequest req,
               int errorStatus)
  throws SnmpStatusException {
  final SnmpVarBind statusvb  = req.getRowStatusVarBind();
  final SnmpStatusException x = new SnmpStatusException(errorStatus);
  req.registerSetException(statusvb,x);
    }
View Full Code Here

TOP

Related Classes of com.sun.jmx.snmp.SnmpVarBind

Copyright © 2018 www.massapicom. 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.