com.sun.jmx.snmp.SnmpPduRequestType Java Examples

The following examples show how to use com.sun.jmx.snmp.SnmpPduRequestType. 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: SnmpInformRequest.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * Parses the inform response packet. If the agent responds with error set,
 * it does not parse any further.
 */
synchronized void parsePduPacket(SnmpPduRequestType rpdu) {

    if (rpdu == null)
        return;

    errorStatus = rpdu.getErrorStatus();
    errorIndex = rpdu.getErrorIndex();

    if (errorStatus == snmpRspNoError) {
        updateInternalVarBindWithResult(((SnmpPdu)rpdu).varBindList);
        return;
    }

    if (errorStatus != snmpRspNoError)
        --errorIndex;  // rationalize for index to start with 0.

    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
        SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpInformRequest.class.getName(),
            "parsePduPacket", "received inform response. ErrorStatus/ErrorIndex = "
            + errorStatus + "/" + errorIndex);
    }
}
 
Example #2
Source File: SnmpInformRequest.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * Parses the inform response packet. If the agent responds with error set,
 * it does not parse any further.
 */
synchronized void parsePduPacket(SnmpPduRequestType rpdu) {

    if (rpdu == null)
        return;

    errorStatus = rpdu.getErrorStatus();
    errorIndex = rpdu.getErrorIndex();

    if (errorStatus == snmpRspNoError) {
        updateInternalVarBindWithResult(((SnmpPdu)rpdu).varBindList);
        return;
    }

    if (errorStatus != snmpRspNoError)
        --errorIndex;  // rationalize for index to start with 0.

    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
        SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpInformRequest.class.getName(),
            "parsePduPacket", "received inform response. ErrorStatus/ErrorIndex = "
            + errorStatus + "/" + errorIndex);
    }
}
 
Example #3
Source File: SnmpInformRequest.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * For SNMP Runtime internal use only.
 */
final void invokeOnResponse(Object resp) {
    if (resp != null) {
        if (resp instanceof SnmpPduRequestType)
            responsePdu = (SnmpPduRequestType) resp;
        else
            return;
    }
    setRequestStatus(stReceivedReply);
    queueResponse();
}
 
Example #4
Source File: SnmpInformRequest.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * For SNMP Runtime internal use only.
 */
final void invokeOnResponse(Object resp) {
    if (resp != null) {
        if (resp instanceof SnmpPduRequestType)
            responsePdu = (SnmpPduRequestType) resp;
        else
            return;
    }
    setRequestStatus(stReceivedReply);
    queueResponse();
}