Example usage for java.security PrivilegedAction interface-usage

List of usage examples for java.security PrivilegedAction interface-usage

Introduction

In this page you can find the example usage for java.security PrivilegedAction interface-usage.

Usage

From source file CountFilesAction.java

class CountFilesAction implements PrivilegedAction {
    public Object run() {
        File f = new File(File.separatorChar + "files");
        File[] fArray = f.listFiles();
        return new Integer(fArray.length);
    }

From source file AuthenticateNT.java

class WriteFileAction implements PrivilegedAction {
    public Object run() {
        try {
            File file = new File("D:/", "privilegedFile.txt");
            FileWriter fileWriter = new FileWriter(file);

From source file nl.surfsara.newsreader.loader.ReadNewsreaderDocs.java

/**
 * Accessing HDFS needs to be performed with privileges for a principal (user)
 * enabled. This is an implementation of a PriviligedAction that, as the logged
 * in user, reads NAF documents from a sequence file and stores these on the
 * local file system.
 * 

From source file org.apache.ws.security.message.token.KerberosClientAction.java

/**
 * This class represents a PrivilegedAction implementation to obtain a service ticket from a Kerberos
 * Key Distribution Center.
 */
public class KerberosClientAction implements PrivilegedAction<byte[]> {
    private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory

From source file org.apache.ws.security.message.token.KerberosServiceAction.java

/**
 * This class represents a PrivilegedAction implementation to validate a received ticket to a KDC.
 */
public class KerberosServiceAction implements PrivilegedAction<Principal> {
    private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory
            .getLog(KerberosServiceAction.class);

From source file org.alfresco.web.site.servlet.KerberosSessionSetupPrivilegedAction.java

/**
 * Session Setup Privileged Action Class. Handle the processing of a received SPNEGO packet in the context of the Web
 * tier. Prepares a SPNEGO packet for delegate authentication with the Repository tier. Contributed by Sylvain Chambon
 * and based on the work of gkspencer.
 * 
 * @author gkspencer

From source file org.hyperic.hq.plugin.weblogic.jmx.WeblogicRuntimeDiscoverer.java

public class WeblogicRuntimeDiscoverer implements RuntimeDiscoverer, PrivilegedAction {

    private static final Double DYNAMIC_SVC_SUPPORTED_WEBLOGIC_VERSION = new Double(9.1d);

    private static final boolean useJAAS = WeblogicProductPlugin.useJAAS();
    private static final String PROP_FQDN = "weblogic.discover.fqdn";