com.sun.jmx.snmp.internal.SnmpAccessControlModel Java Examples

The following examples show how to use com.sun.jmx.snmp.internal.SnmpAccessControlModel. 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: AcmChecker.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
AcmChecker(SnmpMibRequest req) {
    engine = (SnmpEngineImpl) req.getEngine();
    //We are in V3 architecture, ACM is in the picture.
    if(engine != null) {
        if(engine.isCheckOidActivated()) {
            try {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)",
                            "SNMP V3 Access Control to be done");
                }
                model = (SnmpAccessControlModel)
                    engine.getAccessControlSubSystem().
                    getModel(SnmpDefinitions.snmpVersionThree);
                principal = req.getPrincipal();
                securityLevel = req.getSecurityLevel();
                pduType = req.getPdu().type;
                version = req.getRequestPduVersion();
                securityModel = req.getSecurityModel();
                contextName = req.getAccessContextName();
                l = new LongList();
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    final StringBuilder strb = new StringBuilder()
                    .append("Will check oid for : principal : ")
                    .append(principal)
                    .append("; securityLevel : ").append(securityLevel)
                    .append("; pduType : ").append(pduType)
                    .append("; version : ").append(version)
                    .append("; securityModel : ").append(securityModel)
                    .append("; contextName : ").append(contextName);
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)", strb.toString());
                }

            }catch(SnmpUnknownModelException e) {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)",
                            "Unknown Model, no ACM check.");
                }
            }
        }
    }
}
 
Example #2
Source File: AcmChecker.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
AcmChecker(SnmpMibRequest req) {
    engine = (SnmpEngineImpl) req.getEngine();
    //We are in V3 architecture, ACM is in the picture.
    if(engine != null) {
        if(engine.isCheckOidActivated()) {
            try {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)",
                            "SNMP V3 Access Control to be done");
                }
                model = (SnmpAccessControlModel)
                    engine.getAccessControlSubSystem().
                    getModel(SnmpDefinitions.snmpVersionThree);
                principal = req.getPrincipal();
                securityLevel = req.getSecurityLevel();
                pduType = req.getPdu().type;
                version = req.getRequestPduVersion();
                securityModel = req.getSecurityModel();
                contextName = req.getAccessContextName();
                l = new LongList();
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    final StringBuilder strb = new StringBuilder()
                    .append("Will check oid for : principal : ")
                    .append(principal)
                    .append("; securityLevel : ").append(securityLevel)
                    .append("; pduType : ").append(pduType)
                    .append("; version : ").append(version)
                    .append("; securityModel : ").append(securityModel)
                    .append("; contextName : ").append(contextName);
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)", strb.toString());
                }

            }catch(SnmpUnknownModelException e) {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)",
                            "Unknown Model, no ACM check.");
                }
            }
        }
    }
}
 
Example #3
Source File: AcmChecker.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
AcmChecker(SnmpMibRequest req) {
    engine = (SnmpEngineImpl) req.getEngine();
    //We are in V3 architecture, ACM is in the picture.
    if(engine != null) {
        if(engine.isCheckOidActivated()) {
            try {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)",
                            "SNMP V3 Access Control to be done");
                }
                model = (SnmpAccessControlModel)
                    engine.getAccessControlSubSystem().
                    getModel(SnmpDefinitions.snmpVersionThree);
                principal = req.getPrincipal();
                securityLevel = req.getSecurityLevel();
                pduType = req.getPdu().type;
                version = req.getRequestPduVersion();
                securityModel = req.getSecurityModel();
                contextName = req.getAccessContextName();
                l = new LongList();
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    final StringBuilder strb = new StringBuilder()
                    .append("Will check oid for : principal : ")
                    .append(principal)
                    .append("; securityLevel : ").append(securityLevel)
                    .append("; pduType : ").append(pduType)
                    .append("; version : ").append(version)
                    .append("; securityModel : ").append(securityModel)
                    .append("; contextName : ").append(contextName);
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)", strb.toString());
                }

            }catch(SnmpUnknownModelException e) {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)",
                            "Unknown Model, no ACM check.");
                }
            }
        }
    }
}
 
Example #4
Source File: AcmChecker.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
AcmChecker(SnmpMibRequest req) {
    engine = (SnmpEngineImpl) req.getEngine();
    //We are in V3 architecture, ACM is in the picture.
    if(engine != null) {
        if(engine.isCheckOidActivated()) {
            try {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)",
                            "SNMP V3 Access Control to be done");
                }
                model = (SnmpAccessControlModel)
                    engine.getAccessControlSubSystem().
                    getModel(SnmpDefinitions.snmpVersionThree);
                principal = req.getPrincipal();
                securityLevel = req.getSecurityLevel();
                pduType = req.getPdu().type;
                version = req.getRequestPduVersion();
                securityModel = req.getSecurityModel();
                contextName = req.getAccessContextName();
                l = new LongList();
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    final StringBuilder strb = new StringBuilder()
                    .append("Will check oid for : principal : ")
                    .append(principal)
                    .append("; securityLevel : ").append(securityLevel)
                    .append("; pduType : ").append(pduType)
                    .append("; version : ").append(version)
                    .append("; securityModel : ").append(securityModel)
                    .append("; contextName : ").append(contextName);
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)", strb.toString());
                }

            }catch(SnmpUnknownModelException e) {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)",
                            "Unknown Model, no ACM check.");
                }
            }
        }
    }
}
 
Example #5
Source File: AcmChecker.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
AcmChecker(SnmpMibRequest req) {
    engine = (SnmpEngineImpl) req.getEngine();
    //We are in V3 architecture, ACM is in the picture.
    if(engine != null) {
        if(engine.isCheckOidActivated()) {
            try {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)",
                            "SNMP V3 Access Control to be done");
                }
                model = (SnmpAccessControlModel)
                    engine.getAccessControlSubSystem().
                    getModel(SnmpDefinitions.snmpVersionThree);
                principal = req.getPrincipal();
                securityLevel = req.getSecurityLevel();
                pduType = req.getPdu().type;
                version = req.getRequestPduVersion();
                securityModel = req.getSecurityModel();
                contextName = req.getAccessContextName();
                l = new LongList();
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    final StringBuilder strb = new StringBuilder()
                    .append("Will check oid for : principal : ")
                    .append(principal)
                    .append("; securityLevel : ").append(securityLevel)
                    .append("; pduType : ").append(pduType)
                    .append("; version : ").append(version)
                    .append("; securityModel : ").append(securityModel)
                    .append("; contextName : ").append(contextName);
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)", strb.toString());
                }

            }catch(SnmpUnknownModelException e) {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)",
                            "Unknown Model, no ACM check.");
                }
            }
        }
    }
}
 
Example #6
Source File: AcmChecker.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
AcmChecker(SnmpMibRequest req) {
    engine = (SnmpEngineImpl) req.getEngine();
    //We are in V3 architecture, ACM is in the picture.
    if(engine != null) {
        if(engine.isCheckOidActivated()) {
            try {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)",
                            "SNMP V3 Access Control to be done");
                }
                model = (SnmpAccessControlModel)
                    engine.getAccessControlSubSystem().
                    getModel(SnmpDefinitions.snmpVersionThree);
                principal = req.getPrincipal();
                securityLevel = req.getSecurityLevel();
                pduType = req.getPdu().type;
                version = req.getRequestPduVersion();
                securityModel = req.getSecurityModel();
                contextName = req.getAccessContextName();
                l = new LongList();
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    final StringBuilder strb = new StringBuilder()
                    .append("Will check oid for : principal : ")
                    .append(principal)
                    .append("; securityLevel : ").append(securityLevel)
                    .append("; pduType : ").append(pduType)
                    .append("; version : ").append(version)
                    .append("; securityModel : ").append(securityModel)
                    .append("; contextName : ").append(contextName);
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)", strb.toString());
                }

            }catch(SnmpUnknownModelException e) {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)",
                            "Unknown Model, no ACM check.");
                }
            }
        }
    }
}
 
Example #7
Source File: AcmChecker.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
AcmChecker(SnmpMibRequest req) {
    engine = (SnmpEngineImpl) req.getEngine();
    //We are in V3 architecture, ACM is in the picture.
    if(engine != null) {
        if(engine.isCheckOidActivated()) {
            try {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)",
                            "SNMP V3 Access Control to be done");
                }
                model = (SnmpAccessControlModel)
                    engine.getAccessControlSubSystem().
                    getModel(SnmpDefinitions.snmpVersionThree);
                principal = req.getPrincipal();
                securityLevel = req.getSecurityLevel();
                pduType = req.getPdu().type;
                version = req.getRequestPduVersion();
                securityModel = req.getSecurityModel();
                contextName = req.getAccessContextName();
                l = new LongList();
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    final StringBuilder strb = new StringBuilder()
                    .append("Will check oid for : principal : ")
                    .append(principal)
                    .append("; securityLevel : ").append(securityLevel)
                    .append("; pduType : ").append(pduType)
                    .append("; version : ").append(version)
                    .append("; securityModel : ").append(securityModel)
                    .append("; contextName : ").append(contextName);
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)", strb.toString());
                }

            }catch(SnmpUnknownModelException e) {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)",
                            "Unknown Model, no ACM check.");
                }
            }
        }
    }
}
 
Example #8
Source File: AcmChecker.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
AcmChecker(SnmpMibRequest req) {
    engine = (SnmpEngineImpl) req.getEngine();
    //We are in V3 architecture, ACM is in the picture.
    if(engine != null) {
        if(engine.isCheckOidActivated()) {
            try {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)",
                            "SNMP V3 Access Control to be done");
                }
                model = (SnmpAccessControlModel)
                    engine.getAccessControlSubSystem().
                    getModel(SnmpDefinitions.snmpVersionThree);
                principal = req.getPrincipal();
                securityLevel = req.getSecurityLevel();
                pduType = req.getPdu().type;
                version = req.getRequestPduVersion();
                securityModel = req.getSecurityModel();
                contextName = req.getAccessContextName();
                l = new LongList();
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    final StringBuilder strb = new StringBuilder()
                    .append("Will check oid for : principal : ")
                    .append(principal)
                    .append("; securityLevel : ").append(securityLevel)
                    .append("; pduType : ").append(pduType)
                    .append("; version : ").append(version)
                    .append("; securityModel : ").append(securityModel)
                    .append("; contextName : ").append(contextName);
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)", strb.toString());
                }

            }catch(SnmpUnknownModelException e) {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)",
                            "Unknown Model, no ACM check.");
                }
            }
        }
    }
}
 
Example #9
Source File: AcmChecker.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
AcmChecker(SnmpMibRequest req) {
    engine = (SnmpEngineImpl) req.getEngine();
    //We are in V3 architecture, ACM is in the picture.
    if(engine != null) {
        if(engine.isCheckOidActivated()) {
            try {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)",
                            "SNMP V3 Access Control to be done");
                }
                model = (SnmpAccessControlModel)
                    engine.getAccessControlSubSystem().
                    getModel(SnmpDefinitions.snmpVersionThree);
                principal = req.getPrincipal();
                securityLevel = req.getSecurityLevel();
                pduType = req.getPdu().type;
                version = req.getRequestPduVersion();
                securityModel = req.getSecurityModel();
                contextName = req.getAccessContextName();
                l = new LongList();
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    final StringBuilder strb = new StringBuilder()
                    .append("Will check oid for : principal : ")
                    .append(principal)
                    .append("; securityLevel : ").append(securityLevel)
                    .append("; pduType : ").append(pduType)
                    .append("; version : ").append(version)
                    .append("; securityModel : ").append(securityModel)
                    .append("; contextName : ").append(contextName);
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)", strb.toString());
                }

            }catch(SnmpUnknownModelException e) {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)",
                            "Unknown Model, no ACM check.");
                }
            }
        }
    }
}
 
Example #10
Source File: AcmChecker.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
AcmChecker(SnmpMibRequest req) {
    engine = (SnmpEngineImpl) req.getEngine();
    //We are in V3 architecture, ACM is in the picture.
    if(engine != null) {
        if(engine.isCheckOidActivated()) {
            try {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)",
                            "SNMP V3 Access Control to be done");
                }
                model = (SnmpAccessControlModel)
                    engine.getAccessControlSubSystem().
                    getModel(SnmpDefinitions.snmpVersionThree);
                principal = req.getPrincipal();
                securityLevel = req.getSecurityLevel();
                pduType = req.getPdu().type;
                version = req.getRequestPduVersion();
                securityModel = req.getSecurityModel();
                contextName = req.getAccessContextName();
                l = new LongList();
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    final StringBuilder strb = new StringBuilder()
                    .append("Will check oid for : principal : ")
                    .append(principal)
                    .append("; securityLevel : ").append(securityLevel)
                    .append("; pduType : ").append(pduType)
                    .append("; version : ").append(version)
                    .append("; securityModel : ").append(securityModel)
                    .append("; contextName : ").append(contextName);
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)", strb.toString());
                }

            }catch(SnmpUnknownModelException e) {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)",
                            "Unknown Model, no ACM check.");
                }
            }
        }
    }
}
 
Example #11
Source File: AcmChecker.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
AcmChecker(SnmpMibRequest req) {
    engine = (SnmpEngineImpl) req.getEngine();
    //We are in V3 architecture, ACM is in the picture.
    if(engine != null) {
        if(engine.isCheckOidActivated()) {
            try {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)",
                            "SNMP V3 Access Control to be done");
                }
                model = (SnmpAccessControlModel)
                    engine.getAccessControlSubSystem().
                    getModel(SnmpDefinitions.snmpVersionThree);
                principal = req.getPrincipal();
                securityLevel = req.getSecurityLevel();
                pduType = req.getPdu().type;
                version = req.getRequestPduVersion();
                securityModel = req.getSecurityModel();
                contextName = req.getAccessContextName();
                l = new LongList();
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    final StringBuilder strb = new StringBuilder()
                    .append("Will check oid for : principal : ")
                    .append(principal)
                    .append("; securityLevel : ").append(securityLevel)
                    .append("; pduType : ").append(pduType)
                    .append("; version : ").append(version)
                    .append("; securityModel : ").append(securityModel)
                    .append("; contextName : ").append(contextName);
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)", strb.toString());
                }

            }catch(SnmpUnknownModelException e) {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)",
                            "Unknown Model, no ACM check.");
                }
            }
        }
    }
}
 
Example #12
Source File: AcmChecker.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
AcmChecker(SnmpMibRequest req) {
    engine = (SnmpEngineImpl) req.getEngine();
    //We are in V3 architecture, ACM is in the picture.
    if(engine != null) {
        if(engine.isCheckOidActivated()) {
            try {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)",
                            "SNMP V3 Access Control to be done");
                }
                model = (SnmpAccessControlModel)
                    engine.getAccessControlSubSystem().
                    getModel(SnmpDefinitions.snmpVersionThree);
                principal = req.getPrincipal();
                securityLevel = req.getSecurityLevel();
                pduType = req.getPdu().type;
                version = req.getRequestPduVersion();
                securityModel = req.getSecurityModel();
                contextName = req.getAccessContextName();
                l = new LongList();
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    final StringBuilder strb = new StringBuilder()
                    .append("Will check oid for : principal : ")
                    .append(principal)
                    .append("; securityLevel : ").append(securityLevel)
                    .append("; pduType : ").append(pduType)
                    .append("; version : ").append(version)
                    .append("; securityModel : ").append(securityModel)
                    .append("; contextName : ").append(contextName);
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)", strb.toString());
                }

            }catch(SnmpUnknownModelException e) {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)",
                            "Unknown Model, no ACM check.");
                }
            }
        }
    }
}
 
Example #13
Source File: AcmChecker.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
AcmChecker(SnmpMibRequest req) {
    engine = (SnmpEngineImpl) req.getEngine();
    //We are in V3 architecture, ACM is in the picture.
    if(engine != null) {
        if(engine.isCheckOidActivated()) {
            try {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)",
                            "SNMP V3 Access Control to be done");
                }
                model = (SnmpAccessControlModel)
                    engine.getAccessControlSubSystem().
                    getModel(SnmpDefinitions.snmpVersionThree);
                principal = req.getPrincipal();
                securityLevel = req.getSecurityLevel();
                pduType = req.getPdu().type;
                version = req.getRequestPduVersion();
                securityModel = req.getSecurityModel();
                contextName = req.getAccessContextName();
                l = new LongList();
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    final StringBuilder strb = new StringBuilder()
                    .append("Will check oid for : principal : ")
                    .append(principal)
                    .append("; securityLevel : ").append(securityLevel)
                    .append("; pduType : ").append(pduType)
                    .append("; version : ").append(version)
                    .append("; securityModel : ").append(securityModel)
                    .append("; contextName : ").append(contextName);
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)", strb.toString());
                }

            }catch(SnmpUnknownModelException e) {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)",
                            "Unknown Model, no ACM check.");
                }
            }
        }
    }
}
 
Example #14
Source File: AcmChecker.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
AcmChecker(SnmpMibRequest req) {
    engine = (SnmpEngineImpl) req.getEngine();
    //We are in V3 architecture, ACM is in the picture.
    if(engine != null) {
        if(engine.isCheckOidActivated()) {
            try {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)",
                            "SNMP V3 Access Control to be done");
                }
                model = (SnmpAccessControlModel)
                    engine.getAccessControlSubSystem().
                    getModel(SnmpDefinitions.snmpVersionThree);
                principal = req.getPrincipal();
                securityLevel = req.getSecurityLevel();
                pduType = req.getPdu().type;
                version = req.getRequestPduVersion();
                securityModel = req.getSecurityModel();
                contextName = req.getAccessContextName();
                l = new LongList();
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    final StringBuilder strb = new StringBuilder()
                    .append("Will check oid for : principal : ")
                    .append(principal)
                    .append("; securityLevel : ").append(securityLevel)
                    .append("; pduType : ").append(pduType)
                    .append("; version : ").append(version)
                    .append("; securityModel : ").append(securityModel)
                    .append("; contextName : ").append(contextName);
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)", strb.toString());
                }

            }catch(SnmpUnknownModelException e) {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
                            SnmpMib.class.getName(),
                            "AcmChecker(SnmpMibRequest)",
                            "Unknown Model, no ACM check.");
                }
            }
        }
    }
}