Java 类com.sun.jmx.snmp.SnmpDataTypeEnums 实例源码

项目:OpenJSharp    文件:SnmpRequestHandler.java   
SnmpPduPacket makeErrorVarbindPdu(SnmpPduPacket req, int statusTag) {

        final SnmpVarBind[] vblist = req.varBindList;
        final int length = vblist.length;

        switch (statusTag) {
        case SnmpDataTypeEnums.errEndOfMibViewTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.endOfMibView;
            break;
        case SnmpDataTypeEnums.errNoSuchObjectTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.noSuchObject;
            break;
        case SnmpDataTypeEnums.errNoSuchInstanceTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.noSuchInstance;
            break;
        default:
            return newErrorResponsePdu(req,snmpRspGenErr,1);
        }
        return newValidResponsePdu(req,vblist);
    }
项目:jdk8u-jdk    文件:SnmpRequestHandler.java   
SnmpPduPacket makeErrorVarbindPdu(SnmpPduPacket req, int statusTag) {

        final SnmpVarBind[] vblist = req.varBindList;
        final int length = vblist.length;

        switch (statusTag) {
        case SnmpDataTypeEnums.errEndOfMibViewTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.endOfMibView;
            break;
        case SnmpDataTypeEnums.errNoSuchObjectTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.noSuchObject;
            break;
        case SnmpDataTypeEnums.errNoSuchInstanceTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.noSuchInstance;
            break;
        default:
            return newErrorResponsePdu(req,snmpRspGenErr,1);
        }
        return newValidResponsePdu(req,vblist);
    }
项目:jdk8u_jdk    文件:SnmpRequestHandler.java   
SnmpPduPacket makeErrorVarbindPdu(SnmpPduPacket req, int statusTag) {

        final SnmpVarBind[] vblist = req.varBindList;
        final int length = vblist.length;

        switch (statusTag) {
        case SnmpDataTypeEnums.errEndOfMibViewTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.endOfMibView;
            break;
        case SnmpDataTypeEnums.errNoSuchObjectTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.noSuchObject;
            break;
        case SnmpDataTypeEnums.errNoSuchInstanceTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.noSuchInstance;
            break;
        default:
            return newErrorResponsePdu(req,snmpRspGenErr,1);
        }
        return newValidResponsePdu(req,vblist);
    }
项目:lookaside_java-1.8.0-openjdk    文件:SnmpRequestHandler.java   
SnmpPduPacket makeErrorVarbindPdu(SnmpPduPacket req, int statusTag) {

        final SnmpVarBind[] vblist = req.varBindList;
        final int length = vblist.length;

        switch (statusTag) {
        case SnmpDataTypeEnums.errEndOfMibViewTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.endOfMibView;
            break;
        case SnmpDataTypeEnums.errNoSuchObjectTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.noSuchObject;
            break;
        case SnmpDataTypeEnums.errNoSuchInstanceTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.noSuchInstance;
            break;
        default:
            return newErrorResponsePdu(req,snmpRspGenErr,1);
        }
        return newValidResponsePdu(req,vblist);
    }
项目:infobip-open-jdk-8    文件:SnmpRequestHandler.java   
SnmpPduPacket makeErrorVarbindPdu(SnmpPduPacket req, int statusTag) {

        final SnmpVarBind[] vblist = req.varBindList;
        final int length = vblist.length;

        switch (statusTag) {
        case SnmpDataTypeEnums.errEndOfMibViewTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.endOfMibView;
            break;
        case SnmpDataTypeEnums.errNoSuchObjectTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.noSuchObject;
            break;
        case SnmpDataTypeEnums.errNoSuchInstanceTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.noSuchInstance;
            break;
        default:
            return newErrorResponsePdu(req,snmpRspGenErr,1);
        }
        return newValidResponsePdu(req,vblist);
    }
项目:jdk8u-dev-jdk    文件:SnmpRequestHandler.java   
SnmpPduPacket makeErrorVarbindPdu(SnmpPduPacket req, int statusTag) {

        final SnmpVarBind[] vblist = req.varBindList;
        final int length = vblist.length;

        switch (statusTag) {
        case SnmpDataTypeEnums.errEndOfMibViewTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.endOfMibView;
            break;
        case SnmpDataTypeEnums.errNoSuchObjectTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.noSuchObject;
            break;
        case SnmpDataTypeEnums.errNoSuchInstanceTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.noSuchInstance;
            break;
        default:
            return newErrorResponsePdu(req,snmpRspGenErr,1);
        }
        return newValidResponsePdu(req,vblist);
    }
项目:jdk7-jdk    文件:SnmpRequestHandler.java   
SnmpPduPacket makeErrorVarbindPdu(SnmpPduPacket req, int statusTag) {

        final SnmpVarBind[] vblist = req.varBindList;
        final int length = vblist.length;

        switch (statusTag) {
        case SnmpDataTypeEnums.errEndOfMibViewTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.endOfMibView;
            break;
        case SnmpDataTypeEnums.errNoSuchObjectTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.noSuchObject;
            break;
        case SnmpDataTypeEnums.errNoSuchInstanceTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.noSuchInstance;
            break;
        default:
            return newErrorResponsePdu(req,snmpRspGenErr,1);
        }
        return newValidResponsePdu(req,vblist);
    }
项目:openjdk-source-code-learn    文件:SnmpRequestHandler.java   
SnmpPduPacket makeErrorVarbindPdu(SnmpPduPacket req, int statusTag) {

        final SnmpVarBind[] vblist = req.varBindList;
        final int length = vblist.length;

        switch (statusTag) {
        case SnmpDataTypeEnums.errEndOfMibViewTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.endOfMibView;
            break;
        case SnmpDataTypeEnums.errNoSuchObjectTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.noSuchObject;
            break;
        case SnmpDataTypeEnums.errNoSuchInstanceTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.noSuchInstance;
            break;
        default:
            return newErrorResponsePdu(req,snmpRspGenErr,1);
        }
        return newValidResponsePdu(req,vblist);
    }
项目:OLD-OpenJDK8    文件:SnmpRequestHandler.java   
SnmpPduPacket makeErrorVarbindPdu(SnmpPduPacket req, int statusTag) {

        final SnmpVarBind[] vblist = req.varBindList;
        final int length = vblist.length;

        switch (statusTag) {
        case SnmpDataTypeEnums.errEndOfMibViewTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.endOfMibView;
            break;
        case SnmpDataTypeEnums.errNoSuchObjectTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.noSuchObject;
            break;
        case SnmpDataTypeEnums.errNoSuchInstanceTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.noSuchInstance;
            break;
        default:
            return newErrorResponsePdu(req,snmpRspGenErr,1);
        }
        return newValidResponsePdu(req,vblist);
    }
项目:openjdk-jdk7u-jdk    文件:SnmpRequestHandler.java   
SnmpPduPacket makeErrorVarbindPdu(SnmpPduPacket req, int statusTag) {

        final SnmpVarBind[] vblist = req.varBindList;
        final int length = vblist.length;

        switch (statusTag) {
        case SnmpDataTypeEnums.errEndOfMibViewTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.endOfMibView;
            break;
        case SnmpDataTypeEnums.errNoSuchObjectTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.noSuchObject;
            break;
        case SnmpDataTypeEnums.errNoSuchInstanceTag:
            for (int i=0 ; i<length ; i++)
                vblist[i].value = SnmpVarBind.noSuchInstance;
            break;
        default:
            return newErrorResponsePdu(req,snmpRspGenErr,1);
        }
        return newValidResponsePdu(req,vblist);
    }
项目:OpenJSharp    文件:SnmpRequestHandler.java   
SnmpPduPacket makeNoMibErrorPdu(SnmpPduRequest req, Object userData) {
    // There is no agent registered
    //
    if (req.version == SnmpDefinitions.snmpVersionOne) {
        // Version 1: => NoSuchName
        return
            newErrorResponsePdu(req,snmpRspNoSuchName,1);
    } else if (req.version == SnmpDefinitions.snmpVersionTwo) {
        // Version 2: => depends on PDU type
        switch (req.type) {
        case pduSetRequestPdu :
        case pduWalkRequest :
            // SET request => NoAccess
            return
                newErrorResponsePdu(req,snmpRspNoAccess,1);
        case pduGetRequestPdu :
            // GET request => NoSuchObject
            return
                makeErrorVarbindPdu(req,SnmpDataTypeEnums.
                                    errNoSuchObjectTag);
        case pduGetNextRequestPdu :
        case pduGetBulkRequestPdu :
            // GET-NEXT or GET-BULK => EndOfMibView
            return
                makeErrorVarbindPdu(req,SnmpDataTypeEnums.
                                    errEndOfMibViewTag);
        default:
        }
    }
    // Something wrong here: => snmpRspGenErr
    return newErrorResponsePdu(req,snmpRspGenErr,1);
}
项目:jdk8u-jdk    文件:SnmpRequestHandler.java   
SnmpPduPacket makeNoMibErrorPdu(SnmpPduRequest req, Object userData) {
    // There is no agent registered
    //
    if (req.version == SnmpDefinitions.snmpVersionOne) {
        // Version 1: => NoSuchName
        return
            newErrorResponsePdu(req,snmpRspNoSuchName,1);
    } else if (req.version == SnmpDefinitions.snmpVersionTwo) {
        // Version 2: => depends on PDU type
        switch (req.type) {
        case pduSetRequestPdu :
        case pduWalkRequest :
            // SET request => NoAccess
            return
                newErrorResponsePdu(req,snmpRspNoAccess,1);
        case pduGetRequestPdu :
            // GET request => NoSuchObject
            return
                makeErrorVarbindPdu(req,SnmpDataTypeEnums.
                                    errNoSuchObjectTag);
        case pduGetNextRequestPdu :
        case pduGetBulkRequestPdu :
            // GET-NEXT or GET-BULK => EndOfMibView
            return
                makeErrorVarbindPdu(req,SnmpDataTypeEnums.
                                    errEndOfMibViewTag);
        default:
        }
    }
    // Something wrong here: => snmpRspGenErr
    return newErrorResponsePdu(req,snmpRspGenErr,1);
}
项目:jdk8u_jdk    文件:SnmpRequestHandler.java   
SnmpPduPacket makeNoMibErrorPdu(SnmpPduRequest req, Object userData) {
    // There is no agent registered
    //
    if (req.version == SnmpDefinitions.snmpVersionOne) {
        // Version 1: => NoSuchName
        return
            newErrorResponsePdu(req,snmpRspNoSuchName,1);
    } else if (req.version == SnmpDefinitions.snmpVersionTwo) {
        // Version 2: => depends on PDU type
        switch (req.type) {
        case pduSetRequestPdu :
        case pduWalkRequest :
            // SET request => NoAccess
            return
                newErrorResponsePdu(req,snmpRspNoAccess,1);
        case pduGetRequestPdu :
            // GET request => NoSuchObject
            return
                makeErrorVarbindPdu(req,SnmpDataTypeEnums.
                                    errNoSuchObjectTag);
        case pduGetNextRequestPdu :
        case pduGetBulkRequestPdu :
            // GET-NEXT or GET-BULK => EndOfMibView
            return
                makeErrorVarbindPdu(req,SnmpDataTypeEnums.
                                    errEndOfMibViewTag);
        default:
        }
    }
    // Something wrong here: => snmpRspGenErr
    return newErrorResponsePdu(req,snmpRspGenErr,1);
}
项目:lookaside_java-1.8.0-openjdk    文件:SnmpRequestHandler.java   
SnmpPduPacket makeNoMibErrorPdu(SnmpPduRequest req, Object userData) {
    // There is no agent registered
    //
    if (req.version == SnmpDefinitions.snmpVersionOne) {
        // Version 1: => NoSuchName
        return
            newErrorResponsePdu(req,snmpRspNoSuchName,1);
    } else if (req.version == SnmpDefinitions.snmpVersionTwo) {
        // Version 2: => depends on PDU type
        switch (req.type) {
        case pduSetRequestPdu :
        case pduWalkRequest :
            // SET request => NoAccess
            return
                newErrorResponsePdu(req,snmpRspNoAccess,1);
        case pduGetRequestPdu :
            // GET request => NoSuchObject
            return
                makeErrorVarbindPdu(req,SnmpDataTypeEnums.
                                    errNoSuchObjectTag);
        case pduGetNextRequestPdu :
        case pduGetBulkRequestPdu :
            // GET-NEXT or GET-BULK => EndOfMibView
            return
                makeErrorVarbindPdu(req,SnmpDataTypeEnums.
                                    errEndOfMibViewTag);
        default:
        }
    }
    // Something wrong here: => snmpRspGenErr
    return newErrorResponsePdu(req,snmpRspGenErr,1);
}
项目:infobip-open-jdk-8    文件:SnmpRequestHandler.java   
SnmpPduPacket makeNoMibErrorPdu(SnmpPduRequest req, Object userData) {
    // There is no agent registered
    //
    if (req.version == SnmpDefinitions.snmpVersionOne) {
        // Version 1: => NoSuchName
        return
            newErrorResponsePdu(req,snmpRspNoSuchName,1);
    } else if (req.version == SnmpDefinitions.snmpVersionTwo) {
        // Version 2: => depends on PDU type
        switch (req.type) {
        case pduSetRequestPdu :
        case pduWalkRequest :
            // SET request => NoAccess
            return
                newErrorResponsePdu(req,snmpRspNoAccess,1);
        case pduGetRequestPdu :
            // GET request => NoSuchObject
            return
                makeErrorVarbindPdu(req,SnmpDataTypeEnums.
                                    errNoSuchObjectTag);
        case pduGetNextRequestPdu :
        case pduGetBulkRequestPdu :
            // GET-NEXT or GET-BULK => EndOfMibView
            return
                makeErrorVarbindPdu(req,SnmpDataTypeEnums.
                                    errEndOfMibViewTag);
        default:
        }
    }
    // Something wrong here: => snmpRspGenErr
    return newErrorResponsePdu(req,snmpRspGenErr,1);
}
项目:jdk8u-dev-jdk    文件:SnmpRequestHandler.java   
SnmpPduPacket makeNoMibErrorPdu(SnmpPduRequest req, Object userData) {
    // There is no agent registered
    //
    if (req.version == SnmpDefinitions.snmpVersionOne) {
        // Version 1: => NoSuchName
        return
            newErrorResponsePdu(req,snmpRspNoSuchName,1);
    } else if (req.version == SnmpDefinitions.snmpVersionTwo) {
        // Version 2: => depends on PDU type
        switch (req.type) {
        case pduSetRequestPdu :
        case pduWalkRequest :
            // SET request => NoAccess
            return
                newErrorResponsePdu(req,snmpRspNoAccess,1);
        case pduGetRequestPdu :
            // GET request => NoSuchObject
            return
                makeErrorVarbindPdu(req,SnmpDataTypeEnums.
                                    errNoSuchObjectTag);
        case pduGetNextRequestPdu :
        case pduGetBulkRequestPdu :
            // GET-NEXT or GET-BULK => EndOfMibView
            return
                makeErrorVarbindPdu(req,SnmpDataTypeEnums.
                                    errEndOfMibViewTag);
        default:
        }
    }
    // Something wrong here: => snmpRspGenErr
    return newErrorResponsePdu(req,snmpRspGenErr,1);
}
项目:jdk7-jdk    文件:SnmpRequestHandler.java   
SnmpPduPacket makeNoMibErrorPdu(SnmpPduRequest req, Object userData) {
    // There is no agent registered
    //
    if (req.version == SnmpDefinitions.snmpVersionOne) {
        // Version 1: => NoSuchName
        return
            newErrorResponsePdu(req,snmpRspNoSuchName,1);
    } else if (req.version == SnmpDefinitions.snmpVersionTwo) {
        // Version 2: => depends on PDU type
        switch (req.type) {
        case pduSetRequestPdu :
        case pduWalkRequest :
            // SET request => NoAccess
            return
                newErrorResponsePdu(req,snmpRspNoAccess,1);
        case pduGetRequestPdu :
            // GET request => NoSuchObject
            return
                makeErrorVarbindPdu(req,SnmpDataTypeEnums.
                                    errNoSuchObjectTag);
        case pduGetNextRequestPdu :
        case pduGetBulkRequestPdu :
            // GET-NEXT or GET-BULK => EndOfMibView
            return
                makeErrorVarbindPdu(req,SnmpDataTypeEnums.
                                    errEndOfMibViewTag);
        default:
        }
    }
    // Something wrong here: => snmpRspGenErr
    return newErrorResponsePdu(req,snmpRspGenErr,1);
}
项目:openjdk-source-code-learn    文件:SnmpRequestHandler.java   
SnmpPduPacket makeNoMibErrorPdu(SnmpPduRequest req, Object userData) {
    // There is no agent registered
    //
    if (req.version == SnmpDefinitions.snmpVersionOne) {
        // Version 1: => NoSuchName
        return
            newErrorResponsePdu(req,snmpRspNoSuchName,1);
    } else if (req.version == SnmpDefinitions.snmpVersionTwo) {
        // Version 2: => depends on PDU type
        switch (req.type) {
        case pduSetRequestPdu :
        case pduWalkRequest :
            // SET request => NoAccess
            return
                newErrorResponsePdu(req,snmpRspNoAccess,1);
        case pduGetRequestPdu :
            // GET request => NoSuchObject
            return
                makeErrorVarbindPdu(req,SnmpDataTypeEnums.
                                    errNoSuchObjectTag);
        case pduGetNextRequestPdu :
        case pduGetBulkRequestPdu :
            // GET-NEXT or GET-BULK => EndOfMibView
            return
                makeErrorVarbindPdu(req,SnmpDataTypeEnums.
                                    errEndOfMibViewTag);
        default:
        }
    }
    // Something wrong here: => snmpRspGenErr
    return newErrorResponsePdu(req,snmpRspGenErr,1);
}
项目:OLD-OpenJDK8    文件:SnmpRequestHandler.java   
SnmpPduPacket makeNoMibErrorPdu(SnmpPduRequest req, Object userData) {
    // There is no agent registered
    //
    if (req.version == SnmpDefinitions.snmpVersionOne) {
        // Version 1: => NoSuchName
        return
            newErrorResponsePdu(req,snmpRspNoSuchName,1);
    } else if (req.version == SnmpDefinitions.snmpVersionTwo) {
        // Version 2: => depends on PDU type
        switch (req.type) {
        case pduSetRequestPdu :
        case pduWalkRequest :
            // SET request => NoAccess
            return
                newErrorResponsePdu(req,snmpRspNoAccess,1);
        case pduGetRequestPdu :
            // GET request => NoSuchObject
            return
                makeErrorVarbindPdu(req,SnmpDataTypeEnums.
                                    errNoSuchObjectTag);
        case pduGetNextRequestPdu :
        case pduGetBulkRequestPdu :
            // GET-NEXT or GET-BULK => EndOfMibView
            return
                makeErrorVarbindPdu(req,SnmpDataTypeEnums.
                                    errEndOfMibViewTag);
        default:
        }
    }
    // Something wrong here: => snmpRspGenErr
    return newErrorResponsePdu(req,snmpRspGenErr,1);
}
项目:openjdk-jdk7u-jdk    文件:SnmpRequestHandler.java   
SnmpPduPacket makeNoMibErrorPdu(SnmpPduRequest req, Object userData) {
    // There is no agent registered
    //
    if (req.version == SnmpDefinitions.snmpVersionOne) {
        // Version 1: => NoSuchName
        return
            newErrorResponsePdu(req,snmpRspNoSuchName,1);
    } else if (req.version == SnmpDefinitions.snmpVersionTwo) {
        // Version 2: => depends on PDU type
        switch (req.type) {
        case pduSetRequestPdu :
        case pduWalkRequest :
            // SET request => NoAccess
            return
                newErrorResponsePdu(req,snmpRspNoAccess,1);
        case pduGetRequestPdu :
            // GET request => NoSuchObject
            return
                makeErrorVarbindPdu(req,SnmpDataTypeEnums.
                                    errNoSuchObjectTag);
        case pduGetNextRequestPdu :
        case pduGetBulkRequestPdu :
            // GET-NEXT or GET-BULK => EndOfMibView
            return
                makeErrorVarbindPdu(req,SnmpDataTypeEnums.
                                    errEndOfMibViewTag);
        default:
        }
    }
    // Something wrong here: => snmpRspGenErr
    return newErrorResponsePdu(req,snmpRspGenErr,1);
}