Example usage for java.lang SecurityManager subclass-usage

List of usage examples for java.lang SecurityManager subclass-usage

Introduction

In this page you can find the example usage for java.lang SecurityManager subclass-usage.

Usage

From source file CustomSecurityManager.java

class CustomSecurityManager extends SecurityManager {
    public CustomSecurityManager() {
        super();
    }

    public void checkRead(String fileName) {

From source file Main.java

public class Main extends SecurityManager {

    // checkMemberAccess needs to be overriden.
    @Override
    public void checkMemberAccess(Class<?> clazz, int which) {
        throw new SecurityException();

From source file Main.java

public class Main extends SecurityManager {

    public static void main(String[] args) {
        AccessControlContext con = AccessController.getContext();

        System.setProperty("java.security.policy", "file:/C:/java.policy");

From source file Main.java

public class Main extends SecurityManager {

    public static void main(String[] args) {
        AccessControlContext con = AccessController.getContext();

        System.setProperty("java.security.policy", "file:/C:/java.policy");

From source file Main.java

class CurrentClassGetter extends SecurityManager {
    public String getClassName() {
        return getClassContext()[1].getName();
    }
}

From source file MainClass.java

class MySecurityManager extends SecurityManager {
    public void checkRead(String file) {
        if (!(file.endsWith(".txt")) && !(file.endsWith(".java")) && !(file.endsWith(".class"))
                && !(file.startsWith("C:\\"))) {
            throw new SecurityException("No Read Permission for : " + file);
        }

From source file com.cloudera.sqoop.util.SubprocessSecurityManager.java

/**
 * A SecurityManager used to run subprocesses and disallow certain actions.
 *
 * This specifically disallows System.exit().
 *
 * This SecurityManager will also check with any existing SecurityManager as

From source file org.apache.sqoop.util.SubprocessSecurityManager.java

/**
 * A SecurityManager used to run subprocesses and disallow certain actions.
 *
 * This specifically disallows System.exit().
 *
 * This SecurityManager will also check with any existing SecurityManager as

From source file org.siyapath.task.SiyapathSecurityManager.java

public class SiyapathSecurityManager extends SecurityManager {
    private static final Log log = LogFactory.getLog(SiyapathSecurityManager.class);

    private String password;
    private boolean active;

From source file org.apache.hadoop.hdfs.DnsMonitorSecurityManager.java

/**
 * 
 * A SecurityManager that logs DNS resolution call's stack traces.
 * 
 */
public class DnsMonitorSecurityManager extends SecurityManager {