Package com.sun.jmx.snmp

Examples of com.sun.jmx.snmp.SnmpStatusException


  public void set(SnmpMibRequest inRequest) throws SnmpStatusException {

      if(isDebugOn()) trace("set","Set in Exception, CAN't be called");
     
    throw new SnmpStatusException(SnmpDefinitions.snmpRspNotWritable);
  }
View Full Code Here


  public void getNext(SnmpMibRequest inRequest) throws SnmpStatusException {
   
      if(isDebugOn()) trace("getNext","GetNext in Exception");

    if(inRequest.getVersion() == SnmpDefinitions.snmpVersionOne)
      throw new SnmpStatusException(SnmpStatusException.noSuchName);
   
    Enumeration l = inRequest.getElements();
    while(l.hasMoreElements()) {
      SnmpVarBind varbind = (SnmpVarBind) l.nextElement();
      varbind.setEndOfMibView();
View Full Code Here

    throws SnmpStatusException {
     
      if(isDebugOn()) trace("getBulk","GetBulk in Exception");
      if(inRequest.getVersion() == SnmpDefinitions.snmpVersionOne)
  throw new SnmpStatusException(SnmpDefinitions.snmpRspGenErr, 0);
     
      Enumeration l = inRequest.getElements();
      while(l.hasMoreElements()) {
  SnmpVarBind varbind = (SnmpVarBind) l.nextElement();
  varbind.setEndOfMibView();
View Full Code Here

  int length = oid.length;
  SnmpMibNode node = null;
 
  if (handlers == null)
            throw new SnmpStatusException(SnmpStatusException.snmpRspGenErr);

  final Object data = handlers.getUserData();

  if (depth >= length) {
      // Nothing is left... the oid is not valid
            throw new SnmpStatusException(SnmpStatusException.noAccess);
  }

  long arc = oid[depth];

  if (isNestedArc(arc)) {
View Full Code Here

    public synchronized void addEntry(SnmpOid oid, ObjectName name,
              Object entry)
  throws SnmpStatusException {
       
  if (isRegistrationRequired() == true && name == null)
      throw new SnmpStatusException(SnmpStatusException.badValue);

        if (size == 0) {
      //            indexes.addElement(index);
            // XX oids.addElement(oid);
      insertOid(0,oid);
View Full Code Here

     */
    public synchronized Object getEntry(SnmpOid rowOid)
  throws SnmpStatusException {
        int pos= findObject(rowOid);
        if (pos == -1)
            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
        return entries.elementAt(pos);
    }
View Full Code Here

    public synchronized ObjectName getEntryName(SnmpOid rowOid)
  throws SnmpStatusException {
        int pos = findObject(rowOid);
  if (entrynames == null) return null;
        if (pos == -1 || pos >= entrynames.size())
            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
        return (ObjectName) entrynames.elementAt(pos);
    }
View Full Code Here

  final SnmpValue rsvalue = vbstatus.value;
 
  if (rsvalue instanceof SnmpInt)
      return ((SnmpInt)rsvalue).intValue();
  else
      throw new SnmpStatusException(
           SnmpStatusException.snmpRspInconsistentValue);
    }
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.SnmpStatusException

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.