Package java.security

Examples of java.security.PrivilegedExceptionAction


        // TODO:
        // Should plugins still be called if service with
        // servicePid is not registered?

        try {
            AccessController.doPrivileged(new PrivilegedExceptionAction() {
                public Object run() throws IOException {
                   
                    store.store(c.getPid(), c.getFactoryPid(), c.properties);
                                          if(dispatchUpdate) {
                    updateTargetServicesMatching(c.properties);
View Full Code Here


    }

    String generatePid(final String factoryPid) throws IOException {
        try {
            return (String) AccessController
                    .doPrivileged(new PrivilegedExceptionAction() {
                        public Object run() throws IOException {
                            return store.generatePid(factoryPid);
                        }
                    });
        } catch (PrivilegedActionException e) {
View Full Code Here

    }

    ConfigurationDictionary load(final String pid) throws IOException {
        try {
            return (ConfigurationDictionary) AccessController
                    .doPrivileged(new PrivilegedExceptionAction() {
                        public Object run() throws IOException {
                                  ConfigurationDictionary cd = store.load(pid);
                                  unbindIfNecessary(cd);
                                  return cd;
                        }
View Full Code Here

    }

    ConfigurationDictionary[] loadAll(final String factoryPid) throws IOException {
        try {
            return (ConfigurationDictionary[]) AccessController
                    .doPrivileged(new PrivilegedExceptionAction() {
                        public Object run() throws IOException {
                                  ConfigurationDictionary[] cds = store.loadAll(factoryPid);
                                  for(int i = 0; cds != null && i < cds.length; ++i) {
                                    unbindIfNecessary(cds[i]);
                                  }
View Full Code Here

            }
            final String callingBundleLocation = hasPerms ? null : this.callingBundleLocation;

            try {
                configurations = (Configuration[]) AccessController
                        .doPrivileged(new PrivilegedExceptionAction() {
                            public Object run() throws IOException,
                                    InvalidSyntaxException {
                                return ConfigurationAdminFactory.this
                                        .listConfigurations(filterString, callingBundleLocation, true);
                            }
View Full Code Here

      {
         if (System.getSecurityManager() == null || context instanceof AbstractKernelControllerContext == false)
            installAction((KernelControllerContext) context);
         else
         {
            PrivilegedExceptionAction action = new PrivilegedExceptionAction()
            {
               public Object run() throws Exception
               {
                  try
                  {
View Full Code Here

    public void sessionSetup(
            final SmbSession session,
            final ServerMessageBlock andx,
            final ServerMessageBlock andxResponse) throws SmbException {
        try {
            Subject.doAs(subject, new PrivilegedExceptionAction(){
                public Object run() throws Exception{
                    setup(session, andx, andxResponse);
                    return null;
                }
            });
View Full Code Here

  }

  public static void makeAccessible(final Method method)
  {
    try {
      AccessController.doPrivileged(new PrivilegedExceptionAction() {
          public Object run()
          {
            method.setAccessible(true);
            return null;
          }
View Full Code Here

            Class ibmc = null;
            try {
                ibmc = Class.forName("com.ibm.jvm.Dump");
                final Method ibmm = ibmc.getMethod("JavaDump", new Class[] {});
               
                AccessController.doPrivileged(new PrivilegedExceptionAction() {
                    public Object run() throws IllegalAccessException,
                            MalformedURLException, InstantiationException,
                            InvocationTargetException {
                        return ibmm.invoke(null, new Object[] {});
                    }
View Full Code Here

    }
  }

  @Test
  public void testTableCreate() throws Exception {
    PrivilegedExceptionAction createTable = new PrivilegedExceptionAction() {
      public Object run() throws Exception {
        HTableDescriptor htd = new HTableDescriptor("testnewtable");
        htd.addFamily(new HColumnDescriptor(TEST_FAMILY));
        ACCESS_CONTROLLER.preCreateTable(ObserverContext.createAndPrepare(CP_ENV, null), htd, null);
        return null;
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.