Package org.rythmengine.sandbox

Examples of org.rythmengine.sandbox.RythmSecurityManager


        SecurityManager csm = conf().get(RythmConfigurationKey.SANDBOX_SECURITY_MANAGER_IMPL);
        int timeout = (Integer) conf().get(RythmConfigurationKey.SANDBOX_TIMEOUT);
        SandboxThreadFactory fact = conf().get(RythmConfigurationKey.SANBOX_THREAD_FACTORY_IMPL);

        SecurityManager ssm = System.getSecurityManager();
        RythmSecurityManager rsm;
        String code;
        if (null == ssm || !(ssm instanceof RythmSecurityManager)) {
            code = conf().get(RythmConfigurationKey.SANDBOX_SECURE_CODE);
            rsm = new RythmSecurityManager(csm, code, this);
        } else {
            rsm = ((RythmSecurityManager) ssm);
            code = rsm.getCode();
        }
        secureCode = code;
        _secureExecutor = new SandboxExecutingService(poolSize, fact, timeout, this, code);
        Sandbox sandbox = new Sandbox(this, _secureExecutor);
        if (ssm != rsm) System.setSecurityManager(rsm);
View Full Code Here

TOP

Related Classes of org.rythmengine.sandbox.RythmSecurityManager

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.