Examples of PrivilegedExceptionAction


Examples of java.security.PrivilegedExceptionAction

        }
    }

    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

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

Examples of java.security.PrivilegedExceptionAction

    }

    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

Examples of java.security.PrivilegedExceptionAction

    }

    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

Examples of java.security.PrivilegedExceptionAction

    }

    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

Examples of java.security.PrivilegedExceptionAction

            }
            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

Examples of java.security.PrivilegedExceptionAction

      {
         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

Examples of java.security.PrivilegedExceptionAction

    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

Examples of java.security.PrivilegedExceptionAction

  }

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

Examples of java.security.PrivilegedExceptionAction

            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
TOP
Copyright © 2018 www.massapi.com. 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.