Package net.jini.security.policy

Examples of net.jini.security.policy.DynamicPolicy


  Policy policy = getPolicy();
  if (!(policy instanceof DynamicPolicy)) {
      throw new UnsupportedOperationException("grants not supported");
  }

  DynamicPolicy dpolicy = (DynamicPolicy) policy;
  Principal[] principals = getCurrentPrincipals();
  Permission[] permissions =
      grantablePermissions(dpolicy.getGrants(fromClass, principals));

  dpolicy.grant(toClass, principals, permissions);
  if (policyLogger.isLoggable(Level.FINER)) {
      policyLogger.log(Level.FINER, "granted {0} from {1} to {2}, {3}",
    new Object[]{
        (permissions != null) ? Arrays.asList(permissions) : null,
        fromClass.getName(),
View Full Code Here

TOP

Related Classes of net.jini.security.policy.DynamicPolicy

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.