Package java.security

Examples of java.security.PrivilegedExceptionAction


      if (subject == null)
         throw new SecurityException("No subject associated with secure proxy");

      try
      {
         Subject.doAsPrivileged(subject, new PrivilegedExceptionAction()
         {
            public Object run() throws Exception
            {
               m.invoke(delegate, args);
               return null;
View Full Code Here


      if (subject == null)
         throw new SecurityException("No subject associated with secure proxy");

      try
      {
         Subject.doAsPrivileged(subject, new PrivilegedExceptionAction()
         {
            public Object run() throws Exception
            {
               m.invoke(delegate, args);
               return null;
View Full Code Here

    try {
      // security check
      //AccessController.checkPermission(permission);  // FIXME : uncomment this line.

      // if no exception occurred, we can perform the startup under priv. rights
      AccessController.doPrivileged(new PrivilegedExceptionAction() {
        public Object run() throws SystemStartupException {
          doStartup();
          return null;
        }
      });
View Full Code Here

        if (sessionCommandGroup == null) {
            sessionCommandGroup = new SessionCommandGroup(bc);
        }
        groupName = group;
        try {
            AccessController.doPrivileged(new PrivilegedExceptionAction() {
                public Object run() throws IOException {
                    parseCommand(cmd);
                    return null;
                }
            });
View Full Code Here

    public FileTemplateLoader(final File baseDir, final boolean allowLinking)
    throws
      IOException
    {
        try {
            Object[] retval = (Object[]) AccessController.doPrivileged(new PrivilegedExceptionAction() {
                public Object run() throws IOException {
                    if (!baseDir.exists()) {
                        throw new FileNotFoundException(baseDir + " does not exist.");
                    }
                    if (!baseDir.isDirectory()) {
View Full Code Here

    public Object findTemplateSource(final String name)
    throws
      IOException
    {
        try {
            return AccessController.doPrivileged(new PrivilegedExceptionAction() {
                public Object run() throws IOException {
                    File source = new File(baseDir, SEP_IS_SLASH ? name :
                        name.replace('/', File.separatorChar));
                    if(!source.isFile()) {
                        return null;
View Full Code Here

    throws
        IOException
    {
        try
        {
            return (Reader)AccessController.doPrivileged(new PrivilegedExceptionAction()
            {
                public Object run()
                throws
                    IOException
                {
View Full Code Here

            final URL url = new URL(spec);
            if (url == null) {
                throw new Exception("URL Object construction failed");
            }

            AccessController.doPrivileged(new PrivilegedExceptionAction() {
                public Object run() throws Exception {
                    ConfigurationAdmin configAdmin = null;
                    PushbackReader reader = null;
                    try {
                        configAdmin = getCA();
View Full Code Here

        if (refCA == null) {
            throw new Exception("CM service is not available");
        }
        try {
            srvCA = (ConfigurationAdmin) AccessController
                    .doPrivileged(new PrivilegedExceptionAction() {
                        public Object run() throws Exception {
                            return bc.getService(refCA);
                        }
                    });
        } catch (PrivilegedActionException pae) {
View Full Code Here

        }
    }

    void delete(final ConfigurationImpl c) throws IOException {
        try {
            AccessController.doPrivileged(new PrivilegedExceptionAction() {
                public Object run() throws IOException {
                    ConfigurationDictionary cd = store.delete(c.getPid());
                    if (cd != null) {
                        updateTargetServicesMatching(cd);
                    }
View Full Code Here

TOP

Related Classes of java.security.PrivilegedExceptionAction

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.