Java Code Examples for com.sun.jmx.snmp.SnmpStatusException#noSuchName()

The following examples show how to use com.sun.jmx.snmp.SnmpStatusException#noSuchName() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SnmpErrorHandlerAgent.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Processes a <CODE>get</CODE> operation. It will throw an exception for V1 requests or it will set exceptions within the list for V2 requests.
 *
 * @param inRequest The SnmpMibRequest object holding the list of variable to be retrieved.
 *
 * @exception SnmpStatusException An error occurred during the operation.
 */

@Override
public void get(SnmpMibRequest inRequest) throws SnmpStatusException {

    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
            SnmpErrorHandlerAgent.class.getName(),
            "get", "Get in Exception");

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

    Enumeration<SnmpVarBind> l = inRequest.getElements();
    while(l.hasMoreElements()) {
        SnmpVarBind varbind = l.nextElement();
        varbind.setNoSuchObject();
    }
}
 
Example 2
Source File: SnmpErrorHandlerAgent.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Processes a <CODE>get</CODE> operation. It will throw an exception for V1 requests or it will set exceptions within the list for V2 requests.
 *
 * @param inRequest The SnmpMibRequest object holding the list of variable to be retrieved.
 *
 * @exception SnmpStatusException An error occurred during the operation.
 */

@Override
public void get(SnmpMibRequest inRequest) throws SnmpStatusException {

    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
            SnmpErrorHandlerAgent.class.getName(),
            "get", "Get in Exception");

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

    Enumeration<SnmpVarBind> l = inRequest.getElements();
    while(l.hasMoreElements()) {
        SnmpVarBind varbind = l.nextElement();
        varbind.setNoSuchObject();
    }
}
 
Example 3
Source File: SnmpErrorHandlerAgent.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Processes a <CODE>getNext</CODE> operation. It will throw an exception for V1 requests or it will set exceptions within the list for V2 requests..
 *
 * @param inRequest The SnmpMibRequest object holding the list of variables to be retrieved.
 *
 * @exception SnmpStatusException An error occurred during the operation.
 */

@Override
public void getNext(SnmpMibRequest inRequest) throws SnmpStatusException {

    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
            SnmpErrorHandlerAgent.class.getName(),
            "getNext", "GetNext in Exception");

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

    Enumeration<SnmpVarBind> l = inRequest.getElements();
    while(l.hasMoreElements()) {
        SnmpVarBind varbind = l.nextElement();
        varbind.setEndOfMibView();
    }
}
 
Example 4
Source File: SnmpErrorHandlerAgent.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Processes a <CODE>get</CODE> operation. It will throw an exception for V1 requests or it will set exceptions within the list for V2 requests.
 *
 * @param inRequest The SnmpMibRequest object holding the list of variable to be retrieved.
 *
 * @exception SnmpStatusException An error occurred during the operation.
 */

@Override
public void get(SnmpMibRequest inRequest) throws SnmpStatusException {

    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
            SnmpErrorHandlerAgent.class.getName(),
            "get", "Get in Exception");

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

    Enumeration<SnmpVarBind> l = inRequest.getElements();
    while(l.hasMoreElements()) {
        SnmpVarBind varbind = l.nextElement();
        varbind.setNoSuchObject();
    }
}
 
Example 5
Source File: SnmpErrorHandlerAgent.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * Processes a <CODE>get</CODE> operation. It will throw an exception for V1 requests or it will set exceptions within the list for V2 requests.
 *
 * @param inRequest The SnmpMibRequest object holding the list of variable to be retrieved.
 *
 * @exception SnmpStatusException An error occurred during the operation.
 */

@Override
public void get(SnmpMibRequest inRequest) throws SnmpStatusException {

    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
            SnmpErrorHandlerAgent.class.getName(),
            "get", "Get in Exception");

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

    Enumeration<SnmpVarBind> l = inRequest.getElements();
    while(l.hasMoreElements()) {
        SnmpVarBind varbind = l.nextElement();
        varbind.setNoSuchObject();
    }
}
 
Example 6
Source File: SnmpErrorHandlerAgent.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Processes a <CODE>getNext</CODE> operation. It will throw an exception for V1 requests or it will set exceptions within the list for V2 requests..
 *
 * @param inRequest The SnmpMibRequest object holding the list of variables to be retrieved.
 *
 * @exception SnmpStatusException An error occurred during the operation.
 */

@Override
public void getNext(SnmpMibRequest inRequest) throws SnmpStatusException {

    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
            SnmpErrorHandlerAgent.class.getName(),
            "getNext", "GetNext in Exception");

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

    Enumeration<SnmpVarBind> l = inRequest.getElements();
    while(l.hasMoreElements()) {
        SnmpVarBind varbind = l.nextElement();
        varbind.setEndOfMibView();
    }
}
 
Example 7
Source File: SnmpErrorHandlerAgent.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Processes a <CODE>getNext</CODE> operation. It will throw an exception for V1 requests or it will set exceptions within the list for V2 requests..
 *
 * @param inRequest The SnmpMibRequest object holding the list of variables to be retrieved.
 *
 * @exception SnmpStatusException An error occurred during the operation.
 */

@Override
public void getNext(SnmpMibRequest inRequest) throws SnmpStatusException {

    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
            SnmpErrorHandlerAgent.class.getName(),
            "getNext", "GetNext in Exception");

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

    Enumeration<SnmpVarBind> l = inRequest.getElements();
    while(l.hasMoreElements()) {
        SnmpVarBind varbind = l.nextElement();
        varbind.setEndOfMibView();
    }
}
 
Example 8
Source File: SnmpErrorHandlerAgent.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Processes a <CODE>getNext</CODE> operation. It will throw an exception for V1 requests or it will set exceptions within the list for V2 requests..
 *
 * @param inRequest The SnmpMibRequest object holding the list of variables to be retrieved.
 *
 * @exception SnmpStatusException An error occurred during the operation.
 */

@Override
public void getNext(SnmpMibRequest inRequest) throws SnmpStatusException {

    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
            SnmpErrorHandlerAgent.class.getName(),
            "getNext", "GetNext in Exception");

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

    Enumeration<SnmpVarBind> l = inRequest.getElements();
    while(l.hasMoreElements()) {
        SnmpVarBind varbind = l.nextElement();
        varbind.setEndOfMibView();
    }
}
 
Example 9
Source File: SnmpErrorHandlerAgent.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Processes a <CODE>getNext</CODE> operation. It will throw an exception for V1 requests or it will set exceptions within the list for V2 requests..
 *
 * @param inRequest The SnmpMibRequest object holding the list of variables to be retrieved.
 *
 * @exception SnmpStatusException An error occurred during the operation.
 */

@Override
public void getNext(SnmpMibRequest inRequest) throws SnmpStatusException {

    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
            SnmpErrorHandlerAgent.class.getName(),
            "getNext", "GetNext in Exception");

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

    Enumeration<SnmpVarBind> l = inRequest.getElements();
    while(l.hasMoreElements()) {
        SnmpVarBind varbind = l.nextElement();
        varbind.setEndOfMibView();
    }
}
 
Example 10
Source File: SnmpErrorHandlerAgent.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Processes a <CODE>get</CODE> operation. It will throw an exception for V1 requests or it will set exceptions within the list for V2 requests.
 *
 * @param inRequest The SnmpMibRequest object holding the list of variable to be retrieved.
 *
 * @exception SnmpStatusException An error occurred during the operation.
 */

@Override
public void get(SnmpMibRequest inRequest) throws SnmpStatusException {

    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
            SnmpErrorHandlerAgent.class.getName(),
            "get", "Get in Exception");

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

    Enumeration<SnmpVarBind> l = inRequest.getElements();
    while(l.hasMoreElements()) {
        SnmpVarBind varbind = l.nextElement();
        varbind.setNoSuchObject();
    }
}
 
Example 11
Source File: SnmpErrorHandlerAgent.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Processes a <CODE>get</CODE> operation. It will throw an exception for V1 requests or it will set exceptions within the list for V2 requests.
 *
 * @param inRequest The SnmpMibRequest object holding the list of variable to be retrieved.
 *
 * @exception SnmpStatusException An error occurred during the operation.
 */

@Override
public void get(SnmpMibRequest inRequest) throws SnmpStatusException {

    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
            SnmpErrorHandlerAgent.class.getName(),
            "get", "Get in Exception");

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

    Enumeration<SnmpVarBind> l = inRequest.getElements();
    while(l.hasMoreElements()) {
        SnmpVarBind varbind = l.nextElement();
        varbind.setNoSuchObject();
    }
}
 
Example 12
Source File: SnmpErrorHandlerAgent.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Processes a <CODE>get</CODE> operation. It will throw an exception for V1 requests or it will set exceptions within the list for V2 requests.
 *
 * @param inRequest The SnmpMibRequest object holding the list of variable to be retrieved.
 *
 * @exception SnmpStatusException An error occurred during the operation.
 */

@Override
public void get(SnmpMibRequest inRequest) throws SnmpStatusException {

    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
            SnmpErrorHandlerAgent.class.getName(),
            "get", "Get in Exception");

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

    Enumeration<SnmpVarBind> l = inRequest.getElements();
    while(l.hasMoreElements()) {
        SnmpVarBind varbind = l.nextElement();
        varbind.setNoSuchObject();
    }
}
 
Example 13
Source File: SnmpErrorHandlerAgent.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Processes a <CODE>getNext</CODE> operation. It will throw an exception for V1 requests or it will set exceptions within the list for V2 requests..
 *
 * @param inRequest The SnmpMibRequest object holding the list of variables to be retrieved.
 *
 * @exception SnmpStatusException An error occurred during the operation.
 */

@Override
public void getNext(SnmpMibRequest inRequest) throws SnmpStatusException {

    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
            SnmpErrorHandlerAgent.class.getName(),
            "getNext", "GetNext in Exception");

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

    Enumeration<SnmpVarBind> l = inRequest.getElements();
    while(l.hasMoreElements()) {
        SnmpVarBind varbind = l.nextElement();
        varbind.setEndOfMibView();
    }
}
 
Example 14
Source File: SnmpErrorHandlerAgent.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * Processes a <CODE>getNext</CODE> operation. It will throw an exception for V1 requests or it will set exceptions within the list for V2 requests..
 *
 * @param inRequest The SnmpMibRequest object holding the list of variables to be retrieved.
 *
 * @exception SnmpStatusException An error occurred during the operation.
 */

@Override
public void getNext(SnmpMibRequest inRequest) throws SnmpStatusException {

    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
            SnmpErrorHandlerAgent.class.getName(),
            "getNext", "GetNext in Exception");

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

    Enumeration<SnmpVarBind> l = inRequest.getElements();
    while(l.hasMoreElements()) {
        SnmpVarBind varbind = l.nextElement();
        varbind.setEndOfMibView();
    }
}
 
Example 15
Source File: SnmpTableSupport.java    From JDKSourceCode1.8 with MIT License 3 votes vote down vote up
/**
 * This callback is called by  the associated metadata object
 * when a new table entry has been registered in the
 * table metadata.
 *
 * This method will update the <code>entries</code> list.
 *
 * @param pos   The position at which the new entry was inserted
 *              in the table.
 * @param row   The row OID of the new entry
 * @param name  The ObjectName of the new entry (as specified by the
 *              factory)
 * @param entry The new entry (as returned by the factory)
 * @param meta  The table metadata object.
 *
 **/
public void addEntryCb(int pos, SnmpOid row, ObjectName name,
                       Object entry, SnmpMibTable meta)
    throws SnmpStatusException {
    try {
        if (entries != null) entries.add(pos,entry);
    } catch (Exception e) {
        throw new SnmpStatusException(SnmpStatusException.noSuchName);
    }
}
 
Example 16
Source File: SnmpTableSupport.java    From jdk8u_jdk with GNU General Public License v2.0 3 votes vote down vote up
/**
 * This callback is called by  the associated metadata object
 * when a new table entry has been registered in the
 * table metadata.
 *
 * This method will update the <code>entries</code> list.
 *
 * @param pos   The position at which the new entry was inserted
 *              in the table.
 * @param row   The row OID of the new entry
 * @param name  The ObjectName of the new entry (as specified by the
 *              factory)
 * @param entry The new entry (as returned by the factory)
 * @param meta  The table metadata object.
 *
 **/
public void addEntryCb(int pos, SnmpOid row, ObjectName name,
                       Object entry, SnmpMibTable meta)
    throws SnmpStatusException {
    try {
        if (entries != null) entries.add(pos,entry);
    } catch (Exception e) {
        throw new SnmpStatusException(SnmpStatusException.noSuchName);
    }
}
 
Example 17
Source File: SnmpTableSupport.java    From openjdk-jdk8u with GNU General Public License v2.0 3 votes vote down vote up
/**
 * This callback is called by  the associated metadata object
 * when a new table entry has been registered in the
 * table metadata.
 *
 * This method will update the <code>entries</code> list.
 *
 * @param pos   The position at which the new entry was inserted
 *              in the table.
 * @param row   The row OID of the new entry
 * @param name  The ObjectName of the new entry (as specified by the
 *              factory)
 * @param entry The new entry (as returned by the factory)
 * @param meta  The table metadata object.
 *
 **/
public void addEntryCb(int pos, SnmpOid row, ObjectName name,
                       Object entry, SnmpMibTable meta)
    throws SnmpStatusException {
    try {
        if (entries != null) entries.add(pos,entry);
    } catch (Exception e) {
        throw new SnmpStatusException(SnmpStatusException.noSuchName);
    }
}
 
Example 18
Source File: SnmpTableSupport.java    From hottub with GNU General Public License v2.0 3 votes vote down vote up
/**
 * This callback is called by  the associated metadata object
 * when a new table entry has been registered in the
 * table metadata.
 *
 * This method will update the <code>entries</code> list.
 *
 * @param pos   The position at which the new entry was inserted
 *              in the table.
 * @param row   The row OID of the new entry
 * @param name  The ObjectName of the new entry (as specified by the
 *              factory)
 * @param entry The new entry (as returned by the factory)
 * @param meta  The table metadata object.
 *
 **/
public void addEntryCb(int pos, SnmpOid row, ObjectName name,
                       Object entry, SnmpMibTable meta)
    throws SnmpStatusException {
    try {
        if (entries != null) entries.add(pos,entry);
    } catch (Exception e) {
        throw new SnmpStatusException(SnmpStatusException.noSuchName);
    }
}
 
Example 19
Source File: SnmpTableSupport.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 3 votes vote down vote up
/**
 * This callback is called by  the associated metadata object
 * when a new table entry has been registered in the
 * table metadata.
 *
 * This method will update the <code>entries</code> list.
 *
 * @param pos   The position at which the new entry was inserted
 *              in the table.
 * @param row   The row OID of the new entry
 * @param name  The ObjectName of the new entry (as specified by the
 *              factory)
 * @param entry The new entry (as returned by the factory)
 * @param meta  The table metadata object.
 *
 **/
public void addEntryCb(int pos, SnmpOid row, ObjectName name,
                       Object entry, SnmpMibTable meta)
    throws SnmpStatusException {
    try {
        if (entries != null) entries.add(pos,entry);
    } catch (Exception e) {
        throw new SnmpStatusException(SnmpStatusException.noSuchName);
    }
}
 
Example 20
Source File: SnmpTableSupport.java    From openjdk-8 with GNU General Public License v2.0 3 votes vote down vote up
/**
 * This callback is called by  the associated metadata object
 * when a new table entry has been registered in the
 * table metadata.
 *
 * This method will update the <code>entries</code> list.
 *
 * @param pos   The position at which the new entry was inserted
 *              in the table.
 * @param row   The row OID of the new entry
 * @param name  The ObjectName of the new entry (as specified by the
 *              factory)
 * @param entry The new entry (as returned by the factory)
 * @param meta  The table metadata object.
 *
 **/
public void addEntryCb(int pos, SnmpOid row, ObjectName name,
                       Object entry, SnmpMibTable meta)
    throws SnmpStatusException {
    try {
        if (entries != null) entries.add(pos,entry);
    } catch (Exception e) {
        throw new SnmpStatusException(SnmpStatusException.noSuchName);
    }
}